[JIRA] [git] (JENKINS-20356) Git CLI cannot clone on Windows using GIT_SSH to set credentials

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] [git] (JENKINS-20356) Git CLI cannot clone on Windows using GIT_SSH to set credentials

JIRA noreply@jenkins-ci.org
Change By: Mark Waite (17/Dec/13 2:38 AM)
Description: A git job configured to use the command line implementation with Git plugin 2.0 and git client plugin 1.4.6 fails to clone on Windows, but successfully clones on Linux.

The problem seems to be that it is trying to configure an environment (setting SSH_PASS=echo) for the launched command, even though Windows does not use the same technique to pass environment variables to a process.

I think there was a different behavior in prior versions of git-client.

I created the job by:

0 - #  Configure a global ssh credential
1 - #  Create a new job, restrict it to only run on Windows
2 - #  Use a git ssh protocol URL (like ssh://wheezy64b/var/cache/git/mwaite/bin.git)
3 - #  Select the correct ssh credential from the dropdown list
4 - #  Add a build step (I used XShell "echo hello world")
5 - #  Save the job
6 - #  Run the job

Stack trace on Windows:

{noformat}
Started by user anonymous
Building remotely on alan-pc in workspace C:\J\workspace\git-cli-ssh
Cloning the remote Git repository
Cloning repository ssh://wheezy64b/var/cache/git/mwaite/bin.git
git --version
git version 1.8.3.msysgit.0
using GIT_SSH to set credentials Jenkins
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not clone ssh://wheezy64b/var/cache/git/mwaite/bin.git
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:310)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:151)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:144)
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)
Caused by: hudson.plugins.git.GitException: Command "clone --progress -o origin ssh://wheezy64b/var/cache/git/mwaite/bin.git C:\J\workspace\git-cli-ssh" returned status code 128:
stdout: Cloning into 'C:\J\workspace\git-cli-ssh'...

stderr: error: cannot spawn C:\Users\Alan\AppData\Local\Temp\ssh3783977685963347919.exe: No such file or directory
fatal: unable to fork

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:64)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:308)
... 11 more
ERROR: null
Finished: FAILURE

{noformat}
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.