Hudson git错误ssh [英] Hudson git error ssh
问题描述
如果有任何人可以帮助我理解为什么这个git repo不克隆,将是惊人的。
我从终端运行相同的命令。我希望找到我可以输入密码的位置,以便服务器可以验证连接。
请谢谢。
错误:克隆远程repo'origin'时出错:无法克隆ssh://build@kdmanalytics.net/usr/local/repository/kdm/git/TestCaseGenerator.git
错误:原因:执行/ usr / bin / git时出错clone -o origin ssh://build@kdmanalytics.net/usr/local/repository/kdm/git/TestCaseGenerator.git / var / lib / hudson / jobs / KDM_Test_Case_Generator / workspace
命令返回的状态代码128:/var/lib/hudson/jobs/KDM_Test_Case_Generator/workspace/.git/中初始化的空Git存储库
未指定协议
(ssh-askpass:12523):Gtk-WARNING **:无法打开显示::0.0
主机密钥验证失败。
fatal:远程结束意外挂起
尝试下一个存储库
错误:无法克隆存储库
FATAL:无法克隆
hudson.plugins。 git.GitException:无法克隆
在hudson.plugins.git.GitSCM $ 2.invoke(GitSCM.java:719)
在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)
$ c / c> p>
解决方案你应该在你的repo和git服务器之间建立ssh信任关系。 >
你只需要这样做一次。
简而言之,qs如下:
以运行hudson的用户身份登录
ssh-keygen
$ b 使用空密码
这会在.ssh:id_dsa和id_dsa中创建2个文件.pub。
cat .ssh / id_dsa.pub
现在复制代表公钥的乱码。
ssh repo-server
确认要将主机密钥添加到known_hosts。使用访问存储库的帐户登录。
cat - >> .ssh / authorized_keys
(仔细检查你是否有2>,或冒着你的同事的愤怒)
然后粘贴刚刚复制的乱码
注销并验证您现在可以使用ssh,而无需提供密码。
基于主机。对于github,gitosis,windows的过程是类似的,但是当然不同。
Hudson现在应该能够连接。
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://build@kdmanalytics.net/usr/local/repository/kdm/git/TestCaseGenerator.git
ERROR: Cause: Error performing /usr/bin/git clone -o origin ssh://build@kdmanalytics.net/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)
解决方案 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.
这篇关于Hudson git错误ssh的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!