-
Bug
-
Resolution: Fixed
-
Minor
-
Windows 2k8 R2 SP1. Git-1.9.5-preview20150319, jenkins-1.617, git plugin: 2.3.5, git client plugin: 1.17.1
Hello,
I have installed msysgit under D:\git-1.9.5\Git. git.exe and ssh.exe are available in command prompt
C:\Users\Administrator>git --version
git version 1.9.5.msysgit.1
C:\Users\Administrator>ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1m 19 Mar 2015
As I understood from the following error message
Started by user Administrator Building in workspace D:\jenkins\jobs\test\workspace > D:\git-1.9.5\Git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > D:\git-1.9.5\Git\cmd\git.exe config remote.origin.url ssh://git@gitlab.example.net.org/test/test.git # timeout=10 Fetching upstream changes from ssh://git@gitlab.example.net.org/test/test.git > D:\git-1.9.5\Git\cmd\git.exe --version # timeout=10 using GIT_SSH to set credentials gitlab deploy key FATAL: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win java.lang.RuntimeException: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getSSHExecutable(CliGitAPIImpl.java:1531) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createWindowsGitSSH(CliGitAPIImpl.java:1537) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1300) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1282) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1744) at hudson.model. FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Finished: FAILURE
The plugin could not find the ssh.exe. Maybe related issue - https://issues.jenkins-ci.org/browse/JENKINS-21030 but as I can see the issue has been resolved.
The plugin is regularly tested on Windows systems with git installed in a non-default location. One of my test machines has git installed on the D: drive. I believe another test machine has it installed in a different non-default location.
You may be able to diagnose why it can't find ssh.exe in your case by reviewing the steps the source code currently takes to find ssh.exe on Windows.
The steps used to attempt to locate the correct ssh.exe include:
Some possible places where that will go wrong include:
Based on the "D:\git-1.9.5\Git\cmd\git.exe" in the bug report (thanks for including it), I assume the last stage of the "find ssh.exe" process must be failing your environment.
Does the behavior improve if you use D:\git-1.9.5\Git\bin\git.exe as the git executable instead?