I have successfully cloned Git repository in Jenkins over Git/SSH on Windows 2008 32-bit. When I tried to do the same on Windows 2008 64-bit, Console Output page ge
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
Just add a ssh-enabled user logon to Jenkins and it should work smoothly.
Another issue i faced with was, ssh.exe was not looking at the %userprofile%/.ssh
folder for the key files. Instead it was looking to the folder C:\Program Files (x86)\Git\.ssh
which was empty and which causes a hang due to ssh authentication prompt on the machine where git repo located.
We just copied the key files under %userprofile%/.ssh
to C:\Program Files (x86)\Git\.ssh
and the problem is resolved.
Notes from a hard learned lesson. I had problems getting the ssh to work running Jenkins as a named user account for ssh+git.
Here is what I had to do to solve the problem:
I tried with puttygen and GET_SSH=plink that all failed very bad but no clear errors.
When you have to use any configuration options from a per-user configuration file eg. ~/.ssh/config you can put them in C:\Program Files (x86)\Git\etc\ssh\ssh_config, the key files can be put in C:\Program Files (x86)\Git.ssh
I've gone through these pains recently. Especially frustrating is the lack of error logs in this scenario: probably because MSysgit prompts user on the console when trying to recover - which doesn't get through Jenkins console.
Based on my experience here are a few key elements to watch for:
<MSYSGIT_ROOT>\cmd\git.cmd
than <MSYSGIT_ROOT>\bin\git.exe
HOME
variable for windows slaves explicitygit clone
in an "Execute shell/batch" build step. That should reveal a bit more info. BTW, you can do an env
in the same step and maybe ls %HOME%/.ssh
I think the above is what gave me a working a Windows 7 64bit Jenkins slave with git support - although I thought this had more to do with some other fine config detail than with 64 vs 32 bits. Good luck anyhow!
In the latest version of git, had to use %GIT_HOME%/cmd/git.exe, rather than %GIT_HOME%/bin/git.exe and figuring out the home directory of the user running the jenkins service.