-
Bug
-
Resolution: Won't Fix
-
Minor
-
Jenkins version 1.617, git-plugin v2.4.0, RHEL6
Our RHEL server did not come with a supported version of git, so we had to compile from source. With the way our organization does access-control (we are rootless on our testing and production systems), we wanted to compile git from source on one machine in a directory where we have access, and then copy the compiled binaries to the same directory on other machines (including our Jenkins server).
I have the new git binary located at /opt/mount1/opt/git-2.6.0/bin/git. I added the two properties and values into the Global Properties:
GIT_HOME /opt/mount1/opt/git-2.6.0 PATH $GIT_HOME/bin:$PATH
, but it looks like Jenkins is still using the old GIT version. This is just speculative right now, it's throwing the same error (no remote helpers for HTTPS) as it was before I added GIT_HOME. I ssh'd into the computer and ran that same git clone command myself with the same (new) binary... it cloned the repo fine. Unless there's a way to debug the GIT plugin and find out explicitly what binary it's using, I can only go off of this evidence.
I added a 'pre-build' step and ran echo $(which git) and it pointed to the correct binary - /opt/mount1/opt/git/bin/git, would GIT Plugin then be using this binary?
Summary: We needed a newer version than what was available in the RHEL repos, so we compiled our own and can't get GIT Plugin to use this new binary.
Thanks,
Derek
The git environment manual page doesn't mention anything about a variable named GIT_HOME. Maybe you mean GIT_EXEC_PATH like in JENKINS-29243 ?
If the PATH setting that places your custom git in the PATH prior to the system git is working, then the git executable should be found at your custom path. However, the supporting programs (which programs are supporting likely depends on your git version) will probably not be found. On my git 2.6.0 installation on Ubuntu, the supporting program git-commit (and others) are placed in /usr/lib, so they probably won't be found by the git program. That would likely then cause the git program to report its version as your custom built version, but then it might execute the supporting programs from the system installation.