We currently have a Jenkins master on Windows, an ubuntu slave, and a Windows slave. I'm trying to set up git on the Windows slave. msysgit is installed, and I included the directory in the system path variable so that I can call "git.exe" or "git.cmd" anywhere.
In my Jenkins configuration, I have a credential with a private SSH key. This credential is for Jenkins to use with Git. This works on the master node and the linux slave. I did not put the private ssh key on either of those two servers, Jenkins handled it for me.
But the Windows slave, not so much. When I run a job on the windows slave, all I get is ERROR: Error cloning remote repo 'origin'
.
How can I get the credential working on the Windows slave? Or, if you don't think that's the issue, what would be my next troubleshooting steps?
If you seen any other messages after this error, could you update your question to include them?
Without seeing them, I can only suspect that git on your Windows slave cannot find the .ssh
folder (this folder contains your keys).
Have you already looked at the notes on the Git Plugin page?
Please use C:\Program Files\git\Cmd\git.exe as the git environment variable for the windows slave configuration in Jenkins.
1) Manage Jenkins 2) Manage Nodes 3) Select Windows slave -> go to configuration 4) Add Environment variables for GIT as above complete path.
Also, go to global security settings -> Enable Slave -> Master.
This should work.
Cheers, Ashoka.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With