I had the same problem. The issue is that the Jenkins Git
plugin expects to have git
version 1.8 or higher installed on the Jenkins
server - but doesn't check that or warn you that you're using an out-of-date release. (git
1.8 supports a --local
option to be specified for git config
; git
1.7 doesn't.)
There are a number of options available to you to workaround this:
- Update the version of git installed on your server.
- Have Jenkins download git upon demand, and use that version for building your projects. (This takes quite a bit of configuration.) This option does not use the copy of git installed on your server.
- Have Jenkins use JGit (pure Java version of git which does not require git to be installed on your server) - this uses the JGit that comes with the Jenkins Git Client, so far as I can tell.
Options 2 & 3 are available through the Add Git button on the Manage Jenkins/Configure System page in the Git/Git installations section.
My server runs Ubuntu 10.4 LTS, for which there is no git 1.8 package available in the standard repositories, and I prefer not to install non-packaged software on my server, so that ruled out option 1 for me. I found the configuration for option 2 to be too onerous, and didn't give me a warm feeling that it would continue to work for new git releases. So that left me with option 3, which has been working OK for me.