Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30755

GIT Plugin doesn't respect GIT_HOME or PATH

XMLWordPrintable

      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

            ndeloof Nicolas De Loof
            doverlock Derek Overlock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: