-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Windows 7 slave, Jenkins 1.609.2, git plugin 2.4.0, git client plugin 1.18.0.
-
Powered by SuggestiMate
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.
[JENKINS-30032] Git plugin cannot find ssh with Git for Windows version 2.5.0
If you'd like to try the build which includes the fix, it is available (for now) from the Cloudbees Jenkins server.
Will be included in next git client plugin after 1.18.0.
Problem still occurs with new git client plugin 1.19.0:
12:07:15 Started by upstream project "easyviz-7.1-packages" build number 66 12:07:15 originally caused by: 12:07:15 Started by user Thomas Sondergaard 12:07:15 [EnvInject] - Loading node environment variables. 12:07:16 Building remotely on bob-w7 (win32-vc120 win32) in workspace f:\jenkins\workspace\easyviz-7.1-packages\arch\win32 12:07:18 > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10 12:07:18 Fetching changes from the remote Git repository 12:07:18 > C:\Program Files\Git\bin\git.exe config remote.origin.url git@bitbucket.org:karoshealth/easyviz.git # timeout=10 12:07:18 Pruning obsolete local branches 12:07:18 Fetching upstream changes from git@bitbucket.org:karoshealth/easyviz.git 12:07:18 > C:\Program Files\Git\bin\git.exe --version # timeout=10 12:07:18 using GIT_SSH to set credentials 12:07:18 FATAL: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win 12:07:18 java.lang.RuntimeException: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win 12:07:18 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getSSHExecutable(CliGitAPIImpl.java:1569) 12:07:18 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createWindowsGitSSH(CliGitAPIImpl.java:1575) 12:07:18 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1305) 12:07:18 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62) 12:07:18 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313) 12:07:18 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) 12:07:18 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) 12:07:18 at hudson.remoting.UserRequest.perform(UserRequest.java:121) 12:07:18 at hudson.remoting.UserRequest.perform(UserRequest.java:49) 12:07:18 at hudson.remoting.Request$2.run(Request.java:325) 12:07:18 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 12:07:18 at java.util.concurrent.FutureTask.run(Unknown Source) 12:07:18 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 12:07:18 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 12:07:18 at hudson.remoting.Engine$1$1.run(Engine.java:69) 12:07:18 at java.lang.Thread.run(Unknown Source) 12:07:18 at ......remote call to bob-w7(Native Method) 12:07:18 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360) 12:07:18 at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) 12:07:18 at hudson.remoting.Channel.call(Channel.java:753) 12:07:18 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) 12:07:18 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 12:07:18 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 12:07:18 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 12:07:18 at java.lang.reflect.Method.invoke(Method.java:497) 12:07:18 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) 12:07:18 at com.sun.proxy.$Proxy69.execute(Unknown Source) 12:07:18 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761) 12:07:18 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012) 12:07:18 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043) 12:07:18 at hudson.scm.SCM.checkout(SCM.java:484) 12:07:18 at hudson.model.AbstractProject.checkout(AbstractProject.java:1274) 12:07:18 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) 12:07:18 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 12:07:18 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) 12:07:18 at hudson.model.Run.execute(Run.java:1738) 12:07:18 at hudson.matrix.MatrixRun.run(MatrixRun.java:146) 12:07:18 at hudson.model.ResourceController.execute(ResourceController.java:98) 12:07:18 at hudson.model.Executor.run(Executor.java:381) 12:07:18 Archiving artifacts 12:07:49 An attempt to send an e-mail to empty list of recipients, ignored. 12:07:49 Finished: FAILURE
Did you restart the Jenkins server after installing git client plugin 1.19.0?
If you did, then I will need more information about your git 2.5.0 installation on Windows. Which options did you set when installing git 2.5.0 for Windows? Does the computer also have cygwin installed? Is there some other package on the computer which might be providing ssh.exe?
Yes, I did restart the jenkins server. The slave system information reports
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).
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?
Sorry markewaite, 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.
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.
After retrying again tonight, it works fine. My bad. Setting the bug back to resolved-fixed.
Code changed in jenkins
User: Mark Waite
Path:
src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
http://jenkins-ci.org/commit/git-client-plugin/b6fe319297b9ef5ceb29b260aa37c6cf994b414a
Log:
Check for ssh.exe in usr/bin in addition to bin
[Fix JENKINS-30045] Windows git 2.5.0 can't find ssh
[Fix JENKINS-30032] Windows git 2.5.0 can't find ssh
Compare: https://github.com/jenkinsci/git-client-plugin/compare/673b928b29c9...b6fe319297b9