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

Git plugin uses git.exe as default on Windows server, even for Linux agents

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None
    • Jenkins 2.146
      Default plugins

      When I run Jenkins from the war file on Windows with the default plugins, it defines the git implementation as "git.exe" instead of "git".

      When I add a Linux agent, it incorrectly attempts to use "git.exe" as the git executable on the Linux agent.

      It should use "git" as the default git implementation on Linux agents even when connected from a Windows master.

      Preferred solution is to use a Linux controller rather than a Windows controller because more Jenkins users run Linux controllers than Windows controllers. If that solution is not viable, then an alternate solution is to define a new git implementation like "git-linux" with the path to the git executable on the Linux agents (typically /usr/bin/git or git).

          [JENKINS-54053] Git plugin uses git.exe as default on Windows server, even for Linux agents

          Juraj Simon added a comment -

          Are there any workarounds?

          Juraj Simon added a comment - Are there any workarounds?

          Guido Forthofer added a comment - I have the same problem and find not a solution. The problem is described here https://stackoverflow.com/questions/45956777/how-to-specify-jenkins-slave-git-address-from-jenkins-master-in-jenkins-pipeline https://stackoverflow.com/questions/35223071/jenkins-path-to-git-windows-master-linux-slave https://stackoverflow.com/questions/35852047/jenkins-poll-scm-git-on-windows-master-build-on-linux-slave I use pipeline jobs. Jenkins 2.253

          I found a workaround:

          "Manage Jenkins" -> "Global Tool Configuration" -> Git

          only "git" without path.

          Guido Forthofer added a comment - I found a workaround: "Manage Jenkins" -> "Global Tool Configuration" -> Git only "git" without path.

          Michael Suhr added a comment -

          exists with git plugin after update to version 4.4.1. downgrade to 4.3.0 works again

          Michael Suhr added a comment - exists with git plugin after update to version 4.4.1. downgrade to 4.3.0 works again

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: