2

I'm using Jenkins 1.611 to build on a windows 10 cloud form vm. I'm building from a repo on bitbucket. I have Git for Windows 2.12.2 installed and can clone and pull from the repo in question manually from the Jenkins workspace directory. I can also use git and ssh from the windows command line. So I'm pretty sure my PATH variables are correct. However I continuously get the error below. I've looked at a lot of Jenkins git/ssh questions but can't find a solution.

> git config remote.origin.url git@bitbucket.org:<my repo> # timeout=10
10:56:07 Fetching upstream changes from git@bitbucket.org:<my repo>
10:56:07  > git --version # timeout=10
10:56:08 using GIT_SSH to set credentials 
10:56:08 FATAL: ssh executable not found. The git plugin only supporofficial git client http://git-scm.com/download/win
10:56:08 java.lang.RuntimeException: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win
J.Hammond
  • 251
  • 3
  • 17
  • Also my Jenkins Slave Service is running as a user not the local system account – J.Hammond Apr 13 '17 at 17:58
  • So, have you tried doing what it says to do in the error message? Looks like the plugin needs to have a specific git client, `http://git-scm.com/download/win`. – Jacob Apr 13 '17 at 18:00
  • yes, I downloaded git from there – J.Hammond Apr 13 '17 at 18:06
  • Can you show us your `PATH` for the user that is running Jenkins? – Jacob Apr 13 '17 at 18:13
  • C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Python34;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin – J.Hammond Apr 13 '17 at 18:23
  • also:`C:\Jenkins\workspace>which git` returns `/cmd/git` `C:\Jenkins\workspace>which ssh` returns `/usr/bin/ssh` – J.Hammond Apr 13 '17 at 18:25
  • I think you have a discrepancy between your Jenkins configuration and what you have in your `PATH`. Looking at [this issue](https://issues.jenkins-ci.org/browse/JENKINS-25297), The second comment seems to address your problem. I think you need to make sure that first, you have `C:\Program Files\Git\bin` in your `PATH` and secondly, that you've defined the git executable correctly in the Jenkins config at `/configureTools`. – Jacob Apr 13 '17 at 18:34

0 Answers0