[JIRA] [git-client-plugin] (JENKINS-30045) Git client plugin does not work with new Git for Windows 2.5.0

318 views
Skip to first unread message

will.saxon@greenwayhealth.com (JIRA)

unread,
Aug 19, 2015, 9:07:01 PM8/19/15
to jenkinsc...@googlegroups.com
Will Saxon created an issue
 
Jenkins / Bug JENKINS-30045
Git client plugin does not work with new Git for Windows 2.5.0
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: git-client-plugin
Created: 20/Aug/15 1:06 AM
Environment: Git client plugin 1.18.0, Jenkins 1.609.1, Git for Windows 2.5.0
Priority: Major Major
Reporter: Will Saxon

The new Git for Windows places the SSH binary in a usr/bin/ subdirectory instead of the bin/ directory used by prior releases of msysgit. This results in an error:

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

The 'official' link takes you to a download for this new Git for Windows, so it's not helpful.

A temporary workaround is to create a link to ssh.exe in the $(INSTALLDIR)\bin directory with mklink, e.g.:

mklink "c:\program files\git\bin\ssh.exe" "c:\program files\git\usr\bin\ssh.exe" {quot}

Another thing I noticed, not related to the jenkins plugin, is that the new Git for Windows prepends the NetBIOS domain name in a Windows AD environment by default. So existing jobs which don't explicitly set the username will fail, because the default username is now DOMAIN+username.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

will.saxon@greenwayhealth.com (JIRA)

unread,
Aug 19, 2015, 9:08:01 PM8/19/15
to jenkinsc...@googlegroups.com
Will Saxon updated an issue
Change By: Will Saxon
The new [Git for Windows|https://github.com/git-for-windows/git/releases/tag/v2.5.0.windows.1] places the SSH binary in a usr/bin/ subdirectory instead of the bin/ directory used by prior releases of msysgit. This results in an error:

{quote}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{quote}


The 'official' link takes you to a download for this new Git for Windows, so it's not helpful.

A temporary workaround is to create a link to ssh.exe in the $(INSTALLDIR)\bin directory with mklink, e.g.:

{quote}mklink "c:\program files\git\bin\ssh.exe" "c:\program files\git\usr\bin\ssh.exe"{ quot quote }


Another thing I noticed, not related to the jenkins plugin, is that the new Git for Windows prepends the NetBIOS domain name in a Windows AD environment by default. So existing jobs which don't explicitly set the username will fail, because the default username is now DOMAIN+username. 

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 19, 2015, 9:57:03 PM8/19/15
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Mark Waite
Change By: Mark Waite
Assignee: Nicolas De Loof Mark Waite

scm_issue_link@java.net (JIRA)

unread,
Aug 19, 2015, 11:33:01 PM8/19/15
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-30045
 
Re: Git client plugin does not work with new Git for Windows 2.5.0

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

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 19, 2015, 11:41:01 PM8/19/15
to jenkinsc...@googlegroups.com

If you'd like to try the build which includes the fix, it is available (for now) from the Cloudbees Jenkins server.

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 19, 2015, 11:41:02 PM8/19/15
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 

Will be included in next git client plugin after 1.18.0

Change By: Mark Waite
Status: Open Resolved
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 20, 2015, 9:54:03 AM8/20/15
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Fixed
 

Included in git client plugin 1.19.0

Change By: Mark Waite
Status: Resolved Closed

tim.bayer@gmail.com (JIRA)

unread,
Aug 24, 2015, 7:07:01 PM8/24/15
to jenkinsc...@googlegroups.com
Tim Bayer reopened an issue
 

I may be doing something wrong here as I'm very new to Jenkins, but I was still getting this error with 1.19.0 (I did a full reboot of the server after the upgrade to 1.19.0). I had the same error message until I created the symlink for the temporary workaround. After that it worked fine.

Change By: Tim Bayer
Resolution: Fixed
Status: Closed Reopened

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 24, 2015, 11:58:01 PM8/24/15
to jenkinsc...@googlegroups.com
 
Re: Git client plugin does not work with new Git for Windows 2.5.0

Tim Bayer thanks for the report. Can you provide more information about your environment that might help me better understand what is different between your environment and mine?

JENKINS-30032 was likewise reopened by the original reporter, then was closed again when they did a deeper check of their environment.

Things that might be different:

  • What Windows release (Windows 7, Windows 8, Windows 10, Windows Server 2008, etc.) and version (x86, x64)?
  • 32 bit git or 64 bit git 2.5.0 for Windows?
  • Windows git settings?
  • PATH value used by the Jenkins slave?
  • Does JGit work in your environment? (Jenkins master configuration, add a git implementation, choose JGit from the drop down, save it, then choose JGit from the git implementation menu in the job definition)
  • Are there other providers of Unix-like functionality installed on the Windows machine (like cygwin or msys or ...)?
  • Are there any other things which might be unique about your configuration?

tim.bayer@gmail.com (JIRA)

unread,
Aug 25, 2015, 9:27:02 AM8/25/15
to jenkinsc...@googlegroups.com

Mark Waite Here is some more information about my configuration.

  • Windows 10 x64
  • Git 2.5.0 64bit for windows
  • PATH %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\7-Zip;C:\Program Files\Git\bin
  • I removed the symlink and changed the executable to jgit and it appears to have worked correctly. As soon as I switched it back to default git it failed with the same error message again (without the symlink). Am I right in understanding jgit is not quite ready for production use yet?
  • There are no other unix-like providers.
  • I can't think of anything unique about my config besides the fact that it's windows 10. It's a pretty vanilla Jenkins install and setup.

Hope that helps.

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 25, 2015, 10:09:01 PM8/25/15
to jenkinsc...@googlegroups.com

JGit is ready for production use in those use cases where it is implemented. The JGit implementation inside Jenkins has improved significantly since the initial JGit insertion of several years ago.

There are several use cases which the JGit implementation does not support (submodules, reference repositories, and a few other options available from the menus). Usually it states directly that the particular option is not supported by JGit.

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 11, 2015, 6:22:01 AM9/11/15
to jenkinsc...@googlegroups.com

Tim Bayer I installed a fresh copy of windows 10 and git 2.5.0 on a computer and was unable to duplicate what you reported.

My PATH settings did not include C:\Program Files\Git\mingw64\bin as far as I can tell. Was that a change you added intentionally? Did you get that by choosing to allow full access to all the git commands when you installed git for Windows 2.5.0? That is the option which includes the red text warning that it will change the behavior of find and sort. I didn't choose that option when I installed on my Windows 10 machine.

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 12, 2015, 10:34:04 PM9/12/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-30045
[~bayertm] I installed a fresh copy of windows 10  x64  and git 2.5.0 on a computer and was unable to duplicate what you reported.


My PATH settings did not include C:\Program Files\Git\mingw64\bin as far as I can tell. Was that a change you added intentionally?  Did you get that by choosing to allow full access to all the git commands when you installed git for Windows 2.5.0?  That is the option which includes the red text warning that it will change the behavior of find and sort.  I didn't choose that option when I installed on my Windows 10 machine.


I installed a fresh copy of Windows 7 x86 and git 2.5.0 on a computer using different defaults than the Windows 10 machine.  I wasn't able to duplicate the problem on the Windows 7 machine either.

Any hints what might other things might be different between your environment and the test environments I've configured?

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 17, 2015, 7:19:01 AM9/17/15
to jenkinsc...@googlegroups.com
Mark Waite resolved as Cannot Reproduce
 
Change By: Mark Waite
Status: Reopened Resolved
Resolution: Cannot Reproduce

hannes.hofmann@metrilus.de (JIRA)

unread,
Oct 13, 2015, 11:48:03 AM10/13/15
to jenkinsc...@googlegroups.com
Hannes Hofmann commented on Bug JENKINS-30045
 
Re: Git client plugin does not work with new Git for Windows 2.5.0

I'm having the same issue of ssh not found.

  • Win 7 Ultimate 64 bit
  • git-win 2.5.3 64 bit
  • Jenkins 1.633
  • GIT client plugin 1.19.0
  • GIT plugin 2.4.0
  • PATH: C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\doxygen\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Git\cmd

Git is installed in C:\Program Files\Git
git.exe is in both in the bin and cmd subfolders.
ssh.exe is in the usr/bin subfolder.

In Jenkins / Configure System, a global env. variable GIT_SSH is defined as "C:\Program Files\Git\usr\bin\ssh.exe" (with quotes), but there is no such system-wide (i.e. Windows) environment variable.

The error message is

javax.servlet.ServletException: java.lang.RuntimeException: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: 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:1569)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createWindowsGitSSH(CliGitAPIImpl.java:1575)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1305)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1282)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1273)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2404)
at hudson.plugins.git.UserRemoteConfig$DescriptorImpl.doCheckUrl(UserRemoteConfig.java:156)
at sun.reflect.GeneratedMethodAccessor533.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
... 69 more

hannes.hofmann@metrilus.de (JIRA)

unread,
Oct 13, 2015, 11:52:01 AM10/13/15
to jenkinsc...@googlegroups.com

PS: Using the workaround with a symlink suggested by Will Saxon worked. Thanks!

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 13, 2015, 1:43:01 PM10/13/15
to jenkinsc...@googlegroups.com
Mark Waite reopened an issue
 

Reopening since there are now two users who report the same failure.

Change By: Mark Waite
Resolution: Cannot Reproduce
Status: Resolved Reopened

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 12, 2016, 5:03:05 PM1/12/16
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

neomonkeus@gmail.com (JIRA)

unread,
Jan 22, 2016, 12:33:04 PM1/22/16
to jenkinsc...@googlegroups.com
Neo Monkeus commented on Bug JENKINS-30045
 
Re: Git client plugin does not work with new Git for Windows 2.5.0

I am also seeing this issue with the latest version of Git for window 2.7.0, on git-client version 1.19.0

> git --version # timeout=10
15:42:59 using GIT_SSH to set credentials
15:42:59 FATAL: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win
15:42:59 java.lang.RuntimeException: ssh executable not found. The git plugin only supports official git client http://git-scm.com/download/win

I set /usr/bin/ssh.exe to %GIT_SSH% to workaround the issue.

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 22, 2016, 1:50:33 PM1/22/16
to jenkinsc...@googlegroups.com

I would love to have steps which will allow me to duplicate the scenario. Can you provide the installation location of your git for windows, your environment variables, and anything else that you think might make your case fail when I (and many other users) don't see the same failure?

neomonkeus@gmail.com (JIRA)

unread,
Jan 28, 2016, 11:30:04 AM1/28/16
to jenkinsc...@googlegroups.com

Sorry Mark Waite, haven't had time to follow on this.
With a clean install of win_2012 server, I manually installed git into a non-default location.
It added the location of git to the path, set %GIT_HOME% and was seeing the issue.
I resolved the issue by setting %GIT_SSH%

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 5, 2016, 9:54:03 AM2/5/16
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 5, 2016, 9:54:03 AM2/5/16
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-30045
 
Re: Git client plugin does not work with new Git for Windows 2.5.0

I now have a machine which shows the problem.

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 6, 2016, 4:36:03 PM2/6/16
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 

Believed to be fixed in git client plugin 1.19.3, released 6 Feb 2016

Change By: Mark Waite
Status: Reopened Resolved
Resolution: Fixed

scm_issue_link@java.net (JIRA)

unread,
Jun 5, 2016, 10:48:05 PM6/5/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Mark Waite
Path:
src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java

src/test/java/org/jenkinsci/plugins/gitclient/CliGitAPIImplTest.java
src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java
http://jenkins-ci.org/commit/git-client-plugin/2a2c6d339dcda8556b267f8a3584a5dd762be387
Log:
Add mingw64 dir to ssh location guesser - windows git 2.8.0

Implement ssh executable test in CliGitAPIImplTest, not applicable
to JGit.

May help

JENKINS-30045 , JENKINS-28943 , JENKINS-25297 , & JENKINS-21806
Reply all
Reply to author
Forward
0 new messages