I have Jenkins running on a Linux box, with a Windows 7 slave box. I'm using a fairly standard (I think) setup on the slave box:
- Jenkins 1.428 (slave) running as a service as the local user
- msys-git (aka git bash) for Git
- git plugin version 1.1.12
In my general configuration, I set up "windows git", which points to "C:\Program Files (x86)\Git\cmd\git.cmd".
In my project, I specified my clone URL and branch. Everything else was set as the default. I'm using SSH, so my clone looked like ssh://git@myrepo/myrepo.git.
In Git Bash, I:
- created an rsa keypair
- added the public key to my git repo
- proved to myself that I could clone the repo
Hooray! All set up! I fired up Jenkins, clicked "Build Now", waited 0.31sec and watched it fail with this error:
ssh: myrepo: no address associated with name
The remote end hung up unexpectedly
Huh? Yeah, it looks like a DNS problem.
- add myrepo to the hosts file
- restart the Jenkins service
I have no idea if this will work for you; I only know it worked for me. I can't say I love the solution, but for now it'll do. And to anyone else who sees this problem, let me know if you find a more elegant solution.