Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Cannot Clone from Git/Stash
Cannot Clone from Git/Stash [message #1723129] Thu, 11 February 2016 22:37 Go to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
Hi,

We are trying to set up a job in Hudson that does a pull from a Git/Stash repository. I created an ssh key for the hudson user (had to set the it to have a shell as by default it doesn't) and copied the key to the Stash project's access keys. When I run the job, I get the error below. On the server, I manually did an ssh to the Stash server to ensure that it was added to the known_hosts file and ran the job again, but got the same error.

Can somebody help me setting up the server/job so that it can clone from Git/Stash?

Hudson 3.3.2
Hudson Git Plugin 2.2.14
Stash 3.5.1

Started by user myuser
Cleaning the workspace because project is configured to clean the workspace before each build.
Checkout:workspace / /var/lib/hudson/teams/MyTeam/jobs/MyTeam.MyProject/workspace - hudson.remoting.LocalChannel@22f26736
Using strategy: Default
Git Exe: /usr/bin/git
Checkout:workspace / /var/lib/hudson/teams/MyTeam/jobs/MyTeam.MyProject/workspace - hudson.remoting.LocalChannel@22f26736
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not clone ssh://git@my.stash.net:7999/mru/myproject.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:306)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1082)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1024)
at hudson.FilePath.act(FilePath.java:793)
at hudson.FilePath.act(FilePath.java:775)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:1024)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:793)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1558)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518)
at hudson.model.Run.run(Run.java:1495)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:82)
at hudson.model.Executor.run(Executor.java:137)
Caused by: hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: ssh://git@my.stash.net:7999/project/myproject.git: UnknownHostKey: my.stash.net. RSA key fingerprint is 82:87:9f:ef:21:7b:60:9c:de:38:11:1f:54:11:a1:02
Re: Cannot Clone from Git/Stash [message #1723131 is a reply to message #1723129] Thu, 11 February 2016 22:58 Go to previous messageGo to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
UPDATE:

We've been doing some twiddling and now the RSA error is gone (not sure how we accomplished that) but are now getting "auth fail" error. The hudson user is able to clone the repo on the command line, so it's not the ssh keys. I'm thinking there's an issue with the Hudson Git plugin? Any advice is greatly appreciated.

New error:

Started by user myuser
Cleaning the workspace because project is configured to clean the workspace before each build.
Checkout:workspace / /var/lib/hudson/teams/MyTeam/jobs/MyTeam.MyProject/workspace - hudson.remoting.LocalChannel@22f26736
Using strategy: Default
Git Exe: /usr/bin/git
Checkout:workspace / /var/lib/hudson/teams/MyTeam/jobs/MyTeam.MyProject/workspace - hudson.remoting.LocalChannel@22f26736
Cloning the remote Git repository
Cloning repository master
ERROR: Error cloning remote repo 'master'
hudson.plugins.git.GitException: Could not clone ssh://git@my.stash.net:7999/project/myproject.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:306)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1082)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1024)
at hudson.FilePath.act(FilePath.java:793)
at hudson.FilePath.act(FilePath.java:775)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:1024)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:793)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1558)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518)
at hudson.model.Run.run(Run.java:1495)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:82)
at hudson.model.Executor.run(Executor.java:137)
Caused by: hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: ssh://git@my.stash.net:7999/project/myproject.git: Auth fail
at hudson.plugins.git.GitAPI$2.invoke(GitAPI.java:299)
at hudson.plugins.git.GitAPI$2.invoke(GitAPI.java:286)
at hudson.FilePath.act(FilePath.java:793)
at hudson.FilePath.act(FilePath.java:775)
at hudson.plugins.git.GitAPI.clone(GitAPI.java:286)
... 13 more
Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://my.stash.net:7999/project/myproject.git: Auth fail
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
at hudson.plugins.git.GitAPI$2.invoke(GitAPI.java:293)
... 17 more
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git@my.stash.net:7999/project/myproject.git: Auth fail
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1115)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 20 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
... 27 more
Re: Cannot Clone from Git/Stash [message #1723232 is a reply to message #1723131] Fri, 12 February 2016 15:51 Go to previous message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
The issue was resolved by going into the advanced options under source code management and check the "Use Command line git to clone" box.
Previous Topic:No artifacts are recorded. Is this a Maven project?
Next Topic:Hudson 3.3.3 Release is now available
Goto Forum:
  


Current Time: Mon Oct 07 06:09:34 GMT 2024

Powered by FUDForum. Page generated in 0.03439 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top