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

          [JENKINS-30755] GIT Plugin doesn't respect GIT_HOME or PATH

          Derek Overlock created issue -
          Derek Overlock made changes -
          Description Original: 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_, and I see in the GIT Plugin documentation that we need to set _GIT_HOME_ in the Global Properties for GIT Plugin to use this binary. I have
          {code:java}
          GIT_HOME=/opt/mount1/opt/git-2.6.0
          {code}, 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
          New: 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:
          {code:java}
          GIT_HOME /opt/mount1/opt/git-2.6.0
          PATH $GIT_HOME/bin:$PATH
          {code}, 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
          Mark Waite made changes -
          Link New: This issue duplicates JENKINS-29243 [ JENKINS-29243 ]
          Mark Waite made changes -
          Component/s Original: git-plugin [ 15543 ]
          Mark Waite made changes -
          Link Original: This issue duplicates JENKINS-29243 [ JENKINS-29243 ]
          Mark Waite made changes -
          Attachment New: debian-6-non-standard-git-location.png [ 30779 ]
          Attachment New: CentOS-non-standard-git-location.png [ 30780 ]
          Mark Waite made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Environment Original: Jenkins version 1.6.17, git-plugin v2.4.0, RHEL6 New: Jenkins version 1.617, git-plugin v2.4.0, RHEL6
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 165881 ] New: JNJira + In-Review [ 197840 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: