- Jenkins setup: Main node is linux Jenkins version 2.401.3.
- Current Windows 2012R2 (onprem vsphere) Jenkins Agent node where everything work non-stop has Git version 2.31.1 and Git version 126.96.36.199 (32-bit)
- New Windows 2022 (Azure EastUS) Jenkins Agent node works sometimes and others says it as no access with the exact same creds that it used in its last job. Git 2.41.03
I’ve read posts for two days and have tried numerous config changes but still it only works sporadically.
I feel like it is either a bug with version 2.41.03 or our initial git config on this new node is missing something. It looks like all the ssl settings are right, I’ve ran to no avail: git config --global credential.helper manager
I’d welcome any ideas on where we could have gone wrong? Also I’ve never set up a Jenkins agent (didn’t set this one up either) but I’m thinking about uninstalling the git and re-installing it on the new agent node following the Jenkins instructions on it all since we have minimal projects running on it while we confirm it is good to turn off the 2012R2 server
adding what the success looks like, it is sandwiched between identical failures.
Your failure message is complaining about 2FA accounts requiring a token. Are your credentials being applied on all systems from Jenkins? You are using Jenkins to hold those credentials, yes?
I have the git access token saved in the Jenkins credentials. The old server always works using the Jenkins credentials. You can see at the top of both pics it uses the same Jenkins cred on the same agent node so I can’t figure out why it works once then fails but then will suddenly work again. We must have missed some step somewhere on the new server regarding creds but I just can’t tell what it is.
I think I’ll uninstall git and then reinstall it on the new node since I wasn’t the one who stood this all up.
I prefer to install
MinGit on my Windows agents rather than the full git for Windows. The
MinGit installation avoids doing the more exotic things and is intended for use with CI systems. Refer to the git client plugin documentation for more details on MinGit.
I will give that a whirl this afternoon and see how it goes! Thanks!
oh neat. learn something new. thanks.
I didn’t get minGit installed, I set it up in the systems tools but had to use the repository url in the tools because I didn’t have a company website I could quickly add it to (but I’ll find one come Monday). I put the mingit zip url, the path and the label “New” (label on the new node) but it never installed. I’ll read more on it but got it working for now using the full git.
I remembered the engineer who installed git said he used all the defaults. So I uninstalled, removed the gir dir, rebooted, re-ran the installer and changed one item from the defult. I told it not to use the git credential manager since I want it to use the Jenkins one that has our app tokens.
Since that worked, I bet I could have done something like git --global – unset credential.manager (saw the command somewhere and probably have it wrong since going from memory but hopefully its close to what I bet I could have done.).
I’m still going to get minGit working via the configuration tool settings because that will make future Windows nodes that much easier to setup.
what would be really cool here is to have a lab where you could play around with this without impacting production instances.
Good to hear that you did manage to get your Git configuration figured out, though.
Totally agree on the DEV. We have Dev, Tst and Prd on every other critical app, but not this. Figure I’ll be remedying that lol!