- Now i careated  git folder under  /usr/bin
- I crated a file under this folder named with  git.sh
- I paste your script into that file
- I run this command : sudo chmod +x git.sh
- I restart the Ubuntu server and i validated go-agent active
- I started the pipline on GoCd, result was the same error
- I checket /tmp/git.log with nano. It was empty




Rasih ÇAĞLAYAN <[email protected]>, 4 Eki 2018 Per, 23:41 tarihinde
şunu yazdı:

> Hi Ankit,
> Thanks fo quick response.
>
> I followed the steps you offer; but i am not sure i did it right. (i am
> not experienced ubuntu user). So i want to lise what i did; can you check
> is please ?
>
> 1. I added following line to the /etc/default/go-agent file with sudo nano
> . Result looks like as following; i saved the file
>
> GO_SERVER_URL=https://x1.10.xx6.x9:8154/go
> AGENT_WORK_DIR=/var/lib/${SERVICE_NAME:-go-agent}
> export PATH=/usr/local/bin:$PATH
>
> 2. I checked /usr/local/bin/git folder. It is not exist; i mean
> /usr/local/bin exist but "git" folder not. I created it with   mkdir
> command under bin folder. Is that correct ?
>
> 3. I am not sure what to do about script you shared. What should i do with
> this script ? For example should i create a file that contains this script
> ? If it is, so how to call from this file
>
> As a summary i did not understand how to create git wrapper part and what
> to do with this script ?
>
> Thanks
>
>
> Ankit Srivastava <[email protected]>, 4 Eki 2018 Per, 21:25 tarihinde
> şunu yazdı:
>
>> Hi Raish,
>>
>> In order to diagnose this issue further, I would recommend creating a git
>> wrapper in /usr/local/bin/git which captures stdout/err of the
>> underlying git command and to enable debugging logging of git. Please
>> ensure that /usr/local/bin is available on the PATH before you start
>> your GoCD agent process (you can ensure this by adding export
>> PATH=/usr/local/bin:$PATH` to the file /etc/default/go-agent
>>
>> The following git wrapper script will write any git logs to
>> `/tmp/git.log` The logs will contain detailed HTTP request/response headers
>> between the git client and your bitbucket instance, including the HTTP
>> password in the standard base64 format Authorization: Basic ....Hopefully,
>> this tells you what's wrong with the git operation being executed.
>>
>> #!/bin/bash
>>
>> # enable debug logging of git
>> export GIT_CURL_VERBOSE=1
>> GIT_LOG_FILE=/tmp/git.log
>> echo "=== Executing command $@" >> $GIT_LOG_FILE
>>
>> # execute the actual git binary, replace this with the actual location of 
>> the git executable from `which git`
>> # the output from git will be written to $GIT_LOG_FILE
>> exec /usr/bin/git "$@" >> $GIT_LOG_FILE 2>&1
>>
>>
>> On Thu, Oct 4, 2018 at 9:57 AM Rasih ÇAĞLAYAN <[email protected]>
>> wrote:
>>
>>> Hi.
>>>
>>> *A) As a summary*
>>>
>>> - Is there anyone to share step by step how to confiure gocd agent on
>>> ubuntu with bitbucket private repository ?
>>> It is really important to me, thanks
>>>
>>>
>>> *B) Details*
>>>
>>> - I dont have any problem with windows server for go-server and windows
>>> server for go-agent
>>> - I already using GoCd with seperated windows servers, one for server,
>>> other for agent
>>> - Now i added an Ubuntu agent for .net core projects
>>> - Server still on the Windows 2012R2, i just added one more agent on
>>> ubuntu
>>> - When i create pipeline and run  it, i get following error -
>>>  screenshot can be found at the end of this message
>>>
>>> STDERR: fatal: could not read Password for 'https://[email protected]':
>>> No such device or address
>>>
>>> I have
>>> Items
>>>
>>> -* I am using private bitbucket repository*
>>>
>>> 1. GoCd Server installed on  -   Win 2012 R2 32gb 16 core - Name
>>> GoCd-Server-Win
>>>
>>> 2. GoCd Agent  - installed on  - Win2012 R2 64gb 16 core - Name
>>> GoCd-Agent-Win
>>>
>>> 3. GoCd Agent - installed on - Ubuntu 18.04 LTS 1gb 2cpu - Name
>>> GoCd-Agent-Ubuntu
>>>
>>>
>>> *Any idea ?*
>>> - I tried to git config credential.helper store
>>> - Nothing changed
>>> - When i am cloning my repository on the ubuntu, it does not ask
>>> username and password again, because i already store it.
>>> - But GoCd agent still gives error
>>> - Material - Check Connection is ok : Connection Ok with green check but
>>> agent could not use password
>>> - *Help please*
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "go-cd" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to