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

Git tool chooser ignores node-specific tool locations

    Details

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

      Description

      The git tool chooser appears to be ignoring node-specific tool configurations.

      In the Global Tool Configuration, we have a Git tool (Default) configured as git.exe, as we run Jenkins on Windows. On a macOS node, we have the same tool configured as /usr/local/bin/git.

      When running a pipeline build with the Git plugin's "Disable performance enhancements" checked, it successfully uses /usr/local/bin/git. However, when unchecked, the git tool chooser tries to use git.exe, which doesn't work on the macOS node. I would expect the node-specific tool configuration to override the global tool configuration in this case.

       

      Sample error:

       

      The recommended git tool is: git.exe

      using credential *******
      {{ > git.exe rev-parse --is-inside-work-tree # timeout=10}}
      ERROR: Workspace has a .git repository, but it appears to be corrupt.
      hudson.plugins.git.GitException: Error performing git command: git.exe rev-parse --is-inside-work-tree
      {{ at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2457)}}
      {{ at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2380)}}
      {{ at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2376)}}
      {{ at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1923)}}
      {{ at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1935)}}
      {{ at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.hasGitRepo(CliGitAPIImpl.java:347)}}
      {{ at hudson.plugins.git.GitAPI.hasGitRepo(GitAPI.java:235)}}

      <...more...>

      Caused by: java.io.IOException: Cannot run program "git.exe" (in directory "/Users/user/jenkins/workspace/test-job"): error=2, No such file or directory

      <...more...>

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment -

            I believe this is a duplicate of JENKINS-63519. Thanks for reporting it Keith Johnson. Workaround is to disable the performance improvements.

            Rishabh Budhouliya plans to work on JENKINS-63519 soon.

            Show
            markewaite Mark Waite added a comment - I believe this is a duplicate of JENKINS-63519 . Thanks for reporting it Keith Johnson . Workaround is to disable the performance improvements. Rishabh Budhouliya plans to work on JENKINS-63519 soon.
            Hide
            markewaite Mark Waite added a comment -

            A fix is in progress in PR-949. We'd love to have additional testing to confirm that the fix handles all the cases where issues are being encountered. I've uploaded a pre-release build as git-4.4.2-rc4027.193b7e5f6521.hpi . If your installation allows it, could you confirm that it resolves the issue you're seeing? If you encounter any problems with that pre-release build, please report them in PR-949.

            Show
            markewaite Mark Waite added a comment - A fix is in progress in PR-949 . We'd love to have additional testing to confirm that the fix handles all the cases where issues are being encountered. I've uploaded a pre-release build as git-4.4.2-rc4027.193b7e5f6521.hpi . If your installation allows it, could you confirm that it resolves the issue you're seeing? If you encounter any problems with that pre-release build, please report them in PR-949 .
            Hide
            kjcjohnson Keith Johnson added a comment -

            Yep, that pre-release build fixes the issue I was seeing here. Thanks!

            Show
            kjcjohnson Keith Johnson added a comment - Yep, that pre-release build fixes the issue I was seeing here. Thanks!

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                kjcjohnson Keith Johnson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: