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

Jenkins ignores Git Tool path due to the recent Performance Enhancement Change

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:
    • Released As:
      git plugin 4.4.2

      Description

      After we upgraded the Git plugin to 4.4.1 we started noticing issues with some of our projects picking incorrect Git binary path that causes build failure during the checkout stage. We have to check the "Disable performance enhancements" checkbox to get our builds working again. I do believe this is a bug as our usage has nothing to do with JGit.

      First a quick background on our build env. Our build env consists of a single Jenkins Server running on Windows Server as well as several Windows and Mac jenkins nodes.

      With this setup what we have been doing is set the "Default Git" git tool to 'C:\Program Files\Git\bin\git.exe on Jenkins Server, and we override this on the Mac build nodes with Default Git -> /usr/local/bin/git.

      Prior of Git plugin version 4.4.1 this works perfectly. Windows nodes would use Default Git -> C:\Program Files\Git\bin\git.exe, and Mac nodes would use /usr/local/bin/git

       

      After upgrading Git plugin to version 4.4.1. We noticed that some of our projects with big git repo would choose the Windows

      based path even though they are on the Mac node. We can see the following msg in the build log

       

      [Pipeline] checkoutThe recommended git tool is: C:\Program Files\Git\bin\git.exe

      And of course this will never work on the Mac node

      Caused by: java.io.IOException: Cannot run program "C:\Program Files\Git\bin\git.exe" (in directory "/Users/Shared/Jenkins/Repos/workspace/MyProjectRepo"): error=2, No such file or directory

      No matter what we do the build will always default back to this windows path, this is even after we tried set a secondary git tool name and set the node and checkout call to use it, they get discarded and will keep coming back to this server git path.

      Currently we get around the problem by enabling "Disable Performance Enhancements". This is after going thru the changes in GitHub to figure the problem out. I don't think this feature was intended to fix our specific use case.

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment -

            Thanks for a very clear report!

            Refer to JENKINS-63519 for a link to the git plugin pre-release build that we're testing now to confirm it resolves the problem you've encountered. Your case is especially interesting because you're running a Windows master.

            Show
            markewaite Mark Waite added a comment - Thanks for a very clear report! Refer to JENKINS-63519 for a link to the git plugin pre-release build that we're testing now to confirm it resolves the problem you've encountered. Your case is especially interesting because you're running a Windows master.

              People

              • Assignee:
                Unassigned
                Reporter:
                wokuku Andy Tang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: