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

Git CLI cannot clone with ssh protocol on Windows if Git is in non-default location


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Windows
      Git client plugin 1.5.0
      Git plugin 2.0

      The GIT_SSH fix for JENKINS-20356 only works if the Git program is installed in the default location on Windows. I had installed to a different location and had updated the PATH variable to find that non-default location. All the typical plugin operations worked, except this recently added code for JENKINS-20356 was not able to find ssh.exe.

      The message is misleading, since the issue is not that the plugin only supports official git client. The plugin could not find the ssh.exe program on the simple paths it checked. Unfortunately, it did not search the PATH, it only searched in the ProgramFiles directory, and I had installed to a different drive in order to save space on a small disc that was hosting ProgramFiles.

      Stack trace looks like this:

      Started by user anonymous
      Building remotely on alan-pc in workspace C:\J\workspace\JENKINS-20356
      Cloning the remote Git repository
      Cloning repository ssh://wheezy64b/var/cache/git/mwaite/bin.git
      Fetching upstream changes from ssh://wheezy64b/var/cache/git/mwaite/bin.git
      using GIT_SSH to set credentials Jenkins
      FATAL: git plugin only support official git client http://git-scm.com/download/win
      java.lang.RuntimeException: git plugin only support official git client http://git-scm.com/download/win
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createWindowsGitSSH(CliGitAPIImpl.java:1053)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:963)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:68)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:217)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:349)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      	at java.lang.Thread.run(Unknown Source)

            ndeloof Nicolas De Loof
            markewaite Mark Waite
            1 Vote for this issue
            3 Start watching this issue