Problem with Git plugin

98 views
Skip to first unread message

Martin Bittner

unread,
Jul 27, 2011, 1:50:08 AM7/27/11
to jenkins...@googlegroups.com
Hi, 

I'm having difficulties cloning my git repository. I use the exact same command than the one shown in the log:
git.exe clone --progress -o origin g...@github.com:goElements/elements.git C:\Jenkins\jobs\Elements\workspace

in my command prompt (windows XP) and it works, it cloned the repository to the proper folder. What could prevent it from working when launched from jenkins?
my private key is in pageant and as I said, the exact same command works from my command prompt.

here is the log:

Checkout:workspace / C:\Jenkins\jobs\Elements\workspace - hudson.remoting.LocalChannel@d73256
Using strategy: Default
Checkout:workspace / C:\Jenkins\jobs\Elements\workspace - hudson.remoting.LocalChannel@d73256
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone g...@github.com:goElements/elements.git
ERROR: Cause: Error performing command: git.exe clone --progress -o origin g...@github.com:goElements/elements.git C:\Jenkins\jobs\Elements\workspace
Command "git.exe clone --progress -o origin g...@github.com:goElements/elements.git C:\Jenkins\jobs\Elements\workspace" returned status code 128: Cloning into C:\Jenkins\jobs\Elements\workspace...
Permission denied (publickey).
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:993)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:919)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:919)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:555)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:443)
at hudson.model.Run.run(Run.java:1376)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)



Vojtech Juranek

unread,
Jul 27, 2011, 6:14:48 AM7/27/11
to jenkins...@googlegroups.com
it seems that jenkins users is missing ssh key. You have to add ssh key or use
http:// or git:// instead of ssh for cloning the repository

Martin Bittner

unread,
Jul 27, 2011, 9:12:46 AM7/27/11
to jenkins...@googlegroups.com
Ok, will give this a try.

But how can I load the key for jenkins? I kinda thought that since the issued command works when tried in dos prompt, it'd work with jenkins.

can https:// be used?

Vojtech Juranek

unread,
Jul 27, 2011, 2:34:36 PM7/27/11
to jenkins...@googlegroups.com

> But how can I load the key for jenkins? I kinda thought that since the
> issued command works when tried in dos prompt, it'd work with jenkins.

well, my knowledge of windows is very limited so I'm not sure where the
problem is. If you are running this command under same accnout which also
jenkins uses and it's working, it should IMHO work for jenkins as well (at
least on linux:-)

> can https:// be used?

yes, https should work as well

Reply all
Reply to author
Forward
0 new messages