8

If there is anyone that can help me understand why this git repo isn't cloning that would be amazing.

I runt the same command from the terminal it works. I hoping to find out where I can put the password so the server can authenticate the connection.

Please and thank you.

ERROR: Error cloning remote repo 'origin' : Could not clone ssh://[email protected]/usr/local/repository/kdm/git/TestCaseGenerator.git ERROR: Cause: Error performing /usr/bin/git clone -o origin ssh://[email protected]/usr/local/repository/kdm/git/TestCaseGenerator.git /var/lib/hudson/jobs/KDM_Test_Case_Generator/workspace Command returned status code 128: Initialized empty Git repository in /var/lib/hudson/jobs/KDM_Test_Case_Generator/workspace/.git/ No protocol specified (ssh-askpass:12523): 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:719) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:658) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:658) at hudson.model.AbstractProject.checkout(AbstractProject.java:1046) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1248) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) 
2
  • did you run it as hudson from the terminal or as yourself? Commented Aug 18, 2010 at 21:12
  • Hudson cannot establish a ssh connection because your key is protected by a password. Commented Aug 19, 2010 at 11:58

4 Answers 4

8

You should setup a ssh trust relationship between your repo and the git server.

You only need to do this once.

In short it goes qs follows :

Log in as the user running hudson

ssh-keygen 

use an empty password

This creates 2 files in .ssh : id_dsa and id_dsa.pub.

cat .ssh/id_dsa.pub 

Now copy the gibberish representing the public key.

ssh repo-server 

Confirm you want to add the host key to known_hosts. Log in using the account accessing the repo.

cat - >>.ssh/authorized_keys 

(double check you have 2 >'s or risk the wrath of your colleagues) Then paste the gibberish you just copied.

Log out and verify you can now ssh without having to provide a password.

This works for Unix based hosts. For github, gitosis, windows the process is similar, but of course different.

Hudson should now be able to connect.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! I had been struggling for awhile not understanding why my SSH key wasn't working, until I read your instructions, specifically the line "Log in as the user running hundson" :-)
0

Should that url be:

ssh://[email protected]:/usr/local/repository/kdm/git/TestCaseGenerator.git 

?

(Missing colon after the ".net")

1 Comment

If you provide which protocol to use "explicitly", ':' is not needed.
0

If all should be right but it's strangly not working, make sure your project is rally build on the slave you configured.

Comments

0

You have to check the following:

  1. You are using ssh keys of the user who ran hudson daemon. For example, if user=hudson, then you should log on as hudson and generate ssh keys
  2. You have loaded your public key to your server (github, assembla) from correct .ssh/id_rsa.pub file i.e. for the same user who ran hudson daemon
  3. You have added RSA fingerprint of your server to your .ssh/known_hosts file

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.