Our GoCD 20.1.0 server is being affected by the bug "GitMaterial Authentication failed for the second user who using same repository" reported in the 2 issues listed here:
https://github.com/gocd/gocd/issues/8986https://github.com/gocd/gocd/issues/9153...in which the git clone at the agent uses a different username (previously configured username for that material/repo) than what is configured for the pipeline material. When entering updated credentials on a pipeline material, the "Test Connection" button works on Material config, and the flyweight folder on the GoCD server for the pipeline uses the correct configured credentials. However when a build is triggered and the agent executes the git clone we see the wrong username and correct password being used.
I see an old message:
https://groups.google.com/g/go-cd/c/SgqMvdSxMz4/m/kLqM3c4QBAAJ"GoCD doesn't cache any credentials for git materials. What usually caches credentials is git's credential helper. "
However given that I can observe the git clone command being spawned with the wrong username (exactly as described in the bug reports), it leads me to believe the caching is in GoCD.
git.exe 5188 Process Create C:\Program Files\Git\mingw64\libexec\git-core\git-remote-https.exe SUCCESS PID: 1860, Command line: git-remote-https origin https://someuser%test.com:[password-redacted]@bitbucket.org/myorg/somerepo.gitHas anyone found a workaround to get pipelines to stop using the old username part of the material credentials? I have tried everything I can think of (listed in
my comment in the issue) - short of setting up a new GoCD server. I am assuming that upgrading the GoCD server won't help since the bug reports are still open.
Bitbucket is
deprecating support for using account passwords on March 1, 2022 and we need to find a way to update credentials for all our pipelines.
Regards
Craig
GoCD version: 20.1.0 (11114-f2c1771e333ea92dae82cd78d2efa1310c1086f0)