[JIRA] [git-plugin] (JENKINS-35277) ssh executable not found

434 views
Skip to first unread message

Gregg.Stewart@ca.com (JIRA)

unread,
Jun 1, 2016, 1:33:01 PM6/1/16
to jenkinsc...@googlegroups.com
Gregg Stewart created an issue
 
Jenkins / Bug JENKINS-35277
ssh executable not found
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2016/Jun/01 5:32 PM
Environment: Jenkins: 1.651.2
Git client plugin: 1.19.6
Git plugin: 2.4.4
Github API plugin: 1.75
Github plugin: 1.19.1

Jenkins server installed on Windows 2008. Being accessed from linux chromium browser (primarily).

Jenkins slave installed on different Windows 2008 system. Windows slave, version 2.53.3. This slave system has git-client version 2.8.3.windows.1 installed.
Priority: Minor Minor
Reporter: Gregg Stewart

I tried looking around for open/in progress issues (since I'm using the latest versions) but couldn't find anything.

Background:
I have configured our github repository with a Jenkins (Github plugin) service. So that it sends push notifications to my Jenkins server. This works. I have also configured github account, git-client, and jenkins job to use ssh keys for cloning the git repository. This works too.

Problem:
When pushing a change to the repository the github hook log shows:
Started on Jun 1, 2016 12:34:12 PM
Using strategy: Default
[poll] Last Built Revision: Revision 91b9f11b4d935ab670506c08a3a3c8a308dec95e (refs/remotes/origin/master)
using GIT_SSH to set credentials
ERROR: Failed to record SCM polling
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:1648)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createWindowsGitSSH(CliGitAPIImpl.java:1654)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1372)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1349)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1340)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2441)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:627)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:571)
at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381)
at hudson.scm.SCM.poll(SCM.java:398)
at hudson.model.AbstractProject._poll(AbstractProject.java:1446)
at hudson.model.AbstractProject.poll(AbstractProject.java:1349)
at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:84)
at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:110)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
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 java.lang.Thread.run(Unknown Source)

Additional Configuration Background / Observations:
My job is configured to use a specific label/slave. That slave is configured with Node properties -> Tool Locations -> Pointing to an git client configured under Manage Jenkins -> System Configuration -> Git -> Git installations. This field is used to point to the specific absolute path up to and including the git.exe binary.

But, this doesn't seem to be listened to when it is being triggered via the service. It does listen to this setting when manually running the job. I say this because the name I was using was NOT "Default". The name "Default" is present and uses a different path. Default is set to the path where the git client on my Jenkins server exists so that it wouldn't reflect errors when viewing the properties of the job.

WORKAROUND:
If I configure the Git -> Git installation -> Default to use the location where the git client can be found on my slave then triggering the job based on a push to the git repo works successfully. I've tried removing "Default" completely and this also doesn't work.

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

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

unread,
Jun 1, 2016, 6:58:01 PM6/1/16
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-35277
 
Re: ssh executable not found

Nice to have a report from a fellow CA employee. I'm a director in the Fort Collins office (and currently the primary maintainer of the Jenkins git plugin and the Jenkins git client plugin).

Is your job configured to "Force polling using workspace"? That might improve the behavior by requiring that the polling operation execute on the specific slave that will run the job. Otherwise, it may attempt to run on the master node.

Gregg.Stewart@ca.com (JIRA)

unread,
Jun 2, 2016, 11:20:01 AM6/2/16
to jenkinsc...@googlegroups.com

Hi Mark,

Great to hear from you - and thanks for your response/suggestion. I wasn't using the poll operation. But I just did and confirmed that it gets the same message. But, even your message about it "may attempt to run on the master node"... if by that you mean the Jenkins server then I haven't found that to be the case yet seeing as how my "Default" git location was originally set the git.exe on the master node.

And a little twist in the story has developed. Yesterday, after reporting this issue, I deleted all of my git location settings except the named "CorrectLocation" valid for the slave I am using. After doing this it still failed (no different then earlier). But now even when I add back a "Default" location pointing to the slave's git.exe it doesn't work. I tried uninstalling the all of the git plugins, deleted old data (so not to keep config files laying around), reinstalled, reconfigured, and the push/pull settings don't work even though the manual build does.

Not sure if this helps but wanted to make sure you knew the latest. Maybe we can connect at some point to discuss the possibility of participating in fixing the problem (if you think a fix is warranted).

Cheers,
Gregg

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

unread,
Jun 2, 2016, 12:14:01 PM6/2/16
to jenkinsc...@googlegroups.com

If you're interested in writing a unit test to show the failure, then making the code change to repair the change, you can fork a copy of https://github.com/jenkinsci/git-client-plugin and use "maven" to compile and run your proposed changes.

The method that has the problem is in the stack trace you reported.

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

unread,
Jun 2, 2016, 6:52:01 PM6/2/16
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

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

unread,
Jun 7, 2016, 12:53:01 AM6/7/16
to jenkinsc...@googlegroups.com

Gregg Stewart I've committed a change to the git plugin master repository which may resolve this issue. If you could download the latest pre-release build from the Jenkins build and install it on your Jenkins server, I'd love to know if that change resolves the issue you're seeing as well.

I created the change while evaluating a submodule authentication change for git client plugin 2.0.0-beta1

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

unread,
Aug 1, 2016, 7:58:01 AM8/1/16
to jenkinsc...@googlegroups.com

Gregg Stewart could you try with git plugin 2.5.3? It includes the change I mentioned earlier which extends the search for ssh to one more directory. That additional directory was added in one of the recent (git 2.x) releases of git for windows.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

Gregg.Stewart@ca.com (JIRA)

unread,
Sep 16, 2016, 12:21:01 PM9/16/16
to jenkinsc...@googlegroups.com

Mark Waite I'm really sorry you haven't heard back from me on this in so long. I wasn't ignoring this on purpose. I had moved on without the feature since it would have been a bonus feature but not a requirement. I've been struggling with finding time to get this tested especially since I had introduced changes to that environment that I think exposed either different problems or bugs.

I will give it a try as soon as I am able. Just working through some more pressing issues at this time.

Best regards,
Gregg

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

unread,
Oct 22, 2019, 9:34:07 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Cannot Reproduce
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages