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

Git plug-in tries to use 'git.cmd' on Unix

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.404, Jenkins Git 1.1.6.

      Description

      If I don't explicitly configure the Git tool location for a slave, the Git plug-in assumes the command to be 'git.cmd' regardless of the platform.

      Example from job log on Solaris 5.10:
      ERROR: Cause: Error performing command: git.cmd clone -o origin ssh://<repo> <workspace>
      git.cmd: not found

      It should be noted that this behaviour is seen in a matrix project, with both Windows and Unix slaves. It's possible that the "mother" job Jenkins uses to trigger the jobs on the slaves runs on Windows, and that this confuses the Git plug-in somehow.

      Why is Git's tool location parameter called 'Home' btw (that's the parameter I have to set to 'git')?

        Issue Links

          Activity

          aknuds1 Arve Knudsen created issue -
          aknuds1 Arve Knudsen made changes -
          Field Original Value New Value
          Description If I don't explicitly configure the Git tool location for a slave, the Git plug-in assumes the command to be 'git.cmd' regardless of the platform.

          Example from job log on Solaris 5.10:
          ERROR: Cause: Error performing command: git.cmd clone -o origin ssh://&lt;repo> <workspace>
          git.cmd: not found

          Why is Git's tool location parameter called 'Home' btw (that's the parameter I have to set to 'git')?
          If I don't explicitly configure the Git tool location for a slave, the Git plug-in assumes the command to be 'git.cmd' regardless of the platform.

          Example from job log on Solaris 5.10:
          ERROR: Cause: Error performing command: git.cmd clone -o origin ssh://&lt;repo> <workspace>
          git.cmd: not found

          It should be noted that this behaviour is seen in a matrix project, with both Windows and Unix slaves. It's possible that the "mother" job Jenkins uses to trigger the jobs on the slaves runs on Windows, and that this confuses the Git plug-in somehow.

          Why is Git's tool location parameter called 'Home' btw (that's the parameter I have to set to 'git')?
          Hide
          abayer abayer added a comment -

          Hrm - this was something that showed up on a branch someone was working on at one point, but there are no references to "git.cmd" anywhere in the source tree currently, or in 1.1.6. Are you sure you're running 1.1.6?

          Show
          abayer abayer added a comment - Hrm - this was something that showed up on a branch someone was working on at one point, but there are no references to "git.cmd" anywhere in the source tree currently, or in 1.1.6. Are you sure you're running 1.1.6?
          Hide
          aknuds1 Arve Knudsen added a comment -

          Sorry, it turns out the error was on my end. I checked and it turned out I had configured the Jenkins master to default to 'git.cmd'. It must've made sense before we started adding (Unix) slaves. I think the Git plug-in should auto-detect the system's git command though, as it's impractical to have to configure every Windows node IMO.

          Please consider renaming the tool location also, as one is not actually setting Git's home, but its executable

          Show
          aknuds1 Arve Knudsen added a comment - Sorry, it turns out the error was on my end. I checked and it turned out I had configured the Jenkins master to default to 'git.cmd'. It must've made sense before we started adding (Unix) slaves. I think the Git plug-in should auto-detect the system's git command though, as it's impractical to have to configure every Windows node IMO. Please consider renaming the tool location also, as one is not actually setting Git's home, but its executable
          ohtake_tomohiro OHTAKE Tomohiro made changes -
          Link This issue is duplicated by JENKINS-9199 [ JENKINS-9199 ]
          ohtake_tomohiro OHTAKE Tomohiro made changes -
          Link This issue is duplicated by JENKINS-9200 [ JENKINS-9200 ]
          sogabe sogabe made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Not A Defect [ 7 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              abayer abayer
              Reporter:
              aknuds1 Arve Knudsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: