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

Git plugin cannot find ssh with Git for Windows version 2.5.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Windows 7 slave, Jenkins 1.609.2, git plugin 2.4.0, git client plugin 1.18.0.
    • Similar Issues:

      Description

      The git plugin is confused about ssh.exe not being in the path. Please see the attached log.

      I have the slave set up with git tool path set to C:\Program Files\Git\bin\git.exe.

        Attachments

          Issue Links

            Activity

            Hide
            tsondergaard tsondergaard added a comment - - edited

            Yes, I did restart the jenkins server. The slave system information reports

            java.library.path

            C:\java\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\java\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Ruby193\bin;C:\Program Files (x86)\CVSNT\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\PuTTY;C:\Program Files (x86)\Xoreax\IncrediBuild;C:\Program Files (x86)\Windows Installer XML v3.5\bin;C:\Program Files (x86)\CMake 2.8\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Git\cmd;"C:\java\bin";.

            I set the PATH to the above in a cmd.exe prompt and ssh is not in it:

            C:\Users\jenkins>where ssh
            INFO: Could not find files for the given pattern(s).
            
            Show
            tsondergaard tsondergaard added a comment - - edited Yes, I did restart the jenkins server. The slave system information reports java.library.path C:\java\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\java\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Ruby193\bin;C:\Program Files (x86)\CVSNT\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\PuTTY;C:\Program Files (x86)\Xoreax\IncrediBuild;C:\Program Files (x86)\Windows Installer XML v3.5\bin;C:\Program Files (x86)\CMake 2.8\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Git\cmd;"C:\java\bin";. I set the PATH to the above in a cmd.exe prompt and ssh is not in it: C:\Users\jenkins>where ssh INFO: Could not find files for the given pattern(s).
            Hide
            markewaite Mark Waite added a comment -

            That is a most interesting path. If my assumptions are correct, you're running a 64 bit version of Windows (hinted by the x86 markers in the path) but your path includes the 32 bit version of git (C:\Program Files (x86)\Git\cmd). Is that intentional?

            Is there a git installation inside that 32 bit directory which could be detected by the "where is ssh" guesser that is included in the git client plugin?

            I configured a Jenkins master on a Windows 7 64 bit machine over the weekend and confirmed that Windows git 2.5.0 is well behaved on that machine. Any other guesses of things that might be unique about your machine that shows the problem?

            Show
            markewaite Mark Waite added a comment - That is a most interesting path. If my assumptions are correct, you're running a 64 bit version of Windows (hinted by the x86 markers in the path) but your path includes the 32 bit version of git (C:\Program Files (x86)\Git\cmd). Is that intentional? Is there a git installation inside that 32 bit directory which could be detected by the "where is ssh" guesser that is included in the git client plugin? I configured a Jenkins master on a Windows 7 64 bit machine over the weekend and confirmed that Windows git 2.5.0 is well behaved on that machine. Any other guesses of things that might be unique about your machine that shows the problem?
            Hide
            tsondergaard tsondergaard added a comment -

            Sorry Mark Waite, I made a mistake. The PATH I showed was after uninstalling Git for Windows 2.5.0 and installing the previos 1.9.5 version. The difference is that git is found in C:\Program Files\Git\cmd instead. It is the 64-bit version of git 2.5.0 I have tried and the Windows is 64-bit, as you have deduced.

            I will give Git for Window 2.5.0 another go with jenkins and report back.

            Show
            tsondergaard tsondergaard added a comment - Sorry Mark Waite , I made a mistake. The PATH I showed was after uninstalling Git for Windows 2.5.0 and installing the previos 1.9.5 version. The difference is that git is found in C:\Program Files\Git\cmd instead. It is the 64-bit version of git 2.5.0 I have tried and the Windows is 64-bit, as you have deduced. I will give Git for Window 2.5.0 another go with jenkins and report back.
            Hide
            markewaite Mark Waite added a comment -

            That's even more interesting, since git 1.9.5 installed at C:\Program Files (x86)\cmd\git.exe should have been able to find the ssh.exe that is stored in the bin directory. There is code in git client plugin 1.18.0 and 1.19.0 to handle that case.

            Thanks for your patience helping to understand why you're seeing a failure and I'm not. Other users will owe you their thanks by the time we understand the root of the problem and fix it in the code.

            Show
            markewaite Mark Waite added a comment - That's even more interesting, since git 1.9.5 installed at C:\Program Files (x86)\cmd\git.exe should have been able to find the ssh.exe that is stored in the bin directory. There is code in git client plugin 1.18.0 and 1.19.0 to handle that case. Thanks for your patience helping to understand why you're seeing a failure and I'm not. Other users will owe you their thanks by the time we understand the root of the problem and fix it in the code.
            Hide
            tsondergaard tsondergaard added a comment -

            After retrying again tonight, it works fine. My bad. Setting the bug back to resolved-fixed.

            Show
            tsondergaard tsondergaard added a comment - After retrying again tonight, it works fine. My bad. Setting the bug back to resolved-fixed.

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                tsondergaard tsondergaard
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: