returned status code 128: Cloning....No protocol specified

2,088 views
Skip to first unread message

Raj

unread,
Oct 28, 2011, 6:09:31 PM10/28/11
to Jenkins Users
I am having issue with git clone. May be someone can guide me.

From command line i can clone git repository meaning ssh keys set
properly. But when i use same from jenkins and getting error.

ERROR: Error cloning remote repo 'origin' : Could not clone
ssh://git.xyz.com:2222/team/xyz


ERROR: Cause: Error performing command: /usr/bin/git clone --progress -
o origin ssh://git.xyz.com:2222/team/xyz


/var/lib/jenkins/workspace/test
Command "/usr/bin/git clone --progress -o origin ssh://git.xyz.com:2222/team/xyz
/var/lib/jenkins/workspace/test" returned status code 128: Cloning
into /var/lib/jenkins/workspace/test...


No protocol specified

(ssh-askpass:10979): Gtk-WARNING **: cannot open display: :0.0
Host key verification failed.
fatal: The remote end hung up unexpectedly

Trying next repository
ERROR: Could not clone repository


FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone


at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1042)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:968)


at hudson.FilePath.act(FilePath.java:785)
at hudson.FilePath.act(FilePath.java:767)


at hudson.plugins.git.GitSCM.checkout(GitSCM.java:968)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)


at hudson.model.AbstractBuild
$AbstractRunner.checkout(AbstractBuild.java:567)


at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:
455)

at hudson.model.Run.run(Run.java:1404)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)

at hudson.model.ResourceController.execute(ResourceController.java:
88)

at hudson.model.Executor.run(Executor.java:230)

pls help.

i have ssh keys under /var/lib/jenkins/.ssh. It should be somewhere
else?

thanks,
Raj

Mirko Friedenhagen

unread,
Oct 29, 2011, 1:19:17 PM10/29/11
to jenkins...@googlegroups.com

Seems your SSH key has a passphrase. At least the ask-password program tries to come up. Either have a passphrase SSH key or start a ssh-agent and pass it's location specified by SSH_AUTH_SOCK to the environment in Jenkins startup script.

Regards Mirko
--
Sent from my phone
http://illegalstateexception.blogspot.com
http://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/

Mirko Friedenhagen

unread,
Oct 29, 2011, 1:21:11 PM10/29/11
to jenkins...@googlegroups.com

Should go: Either have a passphrase *free* SSH key...

Mili Shrivastava

unread,
Nov 1, 2011, 2:34:32 PM11/1/11
to jenkins...@googlegroups.com
I do have passphrase free ssh key setup. I can clone using command line but when i use in jenkin either same script or GIT URL..got error.

pls help me to solve the issue.

let me know if u need more information.

jenkins installed on /var/lib/jenkins and if i clone from command line /home/xyz/git clone ssh://git.xyz.com:2000/team/xyz, i can clone it without any trouble.

but when i use same url in GIT URL, get error code 128...

thanks,
raj

Sami Tikka

unread,
Nov 9, 2011, 5:15:29 PM11/9/11
to jenkins...@googlegroups.com
So git clone works for you on the command line? As the same user the Jenkins is running as? It is possible Jenkins is running as user "jenkins" or something. That user might have home directory that is different from your home directory. The ssh which git uses as transport layer will look for keys in the Jenkins user home dir in subdirectory .ssh

-- Sami
Reply all
Reply to author
Forward
0 new messages