Re: [go-cd] Can get GoCD to perform Git clone when triggering a pipeline

418 views
Skip to first unread message

Ashwanth Kumar

unread,
Feb 24, 2022, 5:28:22 AM2/24/22
to go...@googlegroups.com
Just checking in to see if you're seeing this error while doing "Check Connection" or while running the pipeline? 

If it's while running the pipeline, then the credentials would have to be present at the go-agent and not at the server because agents do the git clone of the materials for the pipeline. This is probably why your pipeline 2 gives you an authentication error, while pipeline 1 gives you no credentials found (or equivalent) errors. Seems like pipeline 2 error seems to be that the username and password used is probably wrong. This can happen if you've any saved password for accessing GoCD and when you open the pop-up "Edit Git Material" screen, browsers (I'm looking at Chrome) tend to auto-populate the saved password over the existing one. This used to happen a while ago for me and got me head scratching for a while until I realised this was the case. See if either of these 2 help you on this.

Thanks,


On Thu, 24 Feb 2022 at 03:34, Sifu Tian <sifutia...@gmail.com> wrote:
Ive been trying all day with no luck
I have 2 pipelines,  and no matter what scenario I choose, they both fail the initial cloning of my repository.  This is leveraging the kubernetes plugin for elastic agents.


pipeline 1:
Materials is set to:
branch master
username and password blank because I am leveraging .git-credentials file on go-server which has valid access token with basic oauth https://XXXXXXTokenXXXXXXX:x-oaut...@github.com

I can perform a git clone on the go-server uder the go user with no problem so I know the connections works.
Error running pipeline :  Cloning into '/go/pipelines/Common_Build'...
STDERR: fatal: could not read Username for 'https://github.com': No such device or address
Failed to run git clone command

pipeline 2:
Materials is set to:
branch master
Username and password are used and have full access to repo

I can perform a git clone on the go-server uder the go user with no problem so I know the connections works.

Error running pipeline:
Cloning into '/go/pipelines/Common_Build'...
STDERR: remote: Repository not found.
STDERR: fatal: Authentication failed for 'https://github.com/org/repo.git/'
Failed to run git clone command


Im really stuck no matter what I do.


--
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 go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/195deac8-b98b-4005-b9fd-f0f5baf459a1n%40googlegroups.com.


--

Ashwanth Kumar / ashwanthkumar.in

Sifu Tian

unread,
Feb 24, 2022, 10:26:15 AM2/24/22
to go-cd
HI Ashwanth,

Im using the kubernetes elastic agent. When I test the connection on either scenario they both work.  Using an ec2 node work fine in both scenarios.
  Screen Shot 2022-02-24 at 10.22.51 AM.png

Sifu Tian

unread,
Feb 24, 2022, 5:44:57 PM2/24/22
to go-cd
Resolve this issue by installing the kubernetes secrets plugin and the pluggable SCM.
Reply all
Reply to author
Forward
0 new messages