[英]Hudson git error ssh
If there is anyone that can help me understand why this git repo isn't cloning that would be amazing. 如果有人可以帮助我理解为什么这个git repo不是克隆那将是惊人的。
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. 您应该在repo和git服务器之间设置ssh信任关系。
You only need to do this once. 你只需要这样做一次。
In short it goes qs follows : 简而言之,它是如下:
Log in as the user running hudson 以运行hudson的用户身份登录
ssh-keygen
use an empty password 使用空密码
This creates 2 files in .ssh : id_dsa and id_dsa.pub. 这将在.ssh:id_dsa和id_dsa.pub中创建2个文件。
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. 确认您要将主机密钥添加到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. (仔细检查你有2>或冒着同事的愤怒)然后粘贴刚复制的乱码。
Log out and verify you can now ssh without having to provide a password. 注销并验证您现在可以ssh而无需提供密码。
This works for Unix based hosts. 这适用于基于Unix的主机。 For github, gitosis, windows the process is similar, but of course different.
对于github,gitosis,windows的过程类似,但当然不同。
Hudson should now be able to connect. 哈德森现在应该能够连接。
Should that url be: 该网址应该是:
ssh://build@kdmanalytics.net:/usr/local/repository/kdm/git/TestCaseGenerator.git
? ?
(Missing colon after the ".net") (“.net”后缺少冒号)
You have to check the following: 你必须检查以下内容:
.ssh/id_rsa.pub
file ie for the same user who ran hudson daemon .ssh/id_rsa.pub
文件中将您的公钥加载到您的服务器(github,assembla),即对于运行hudson守护程序的同一用户 .ssh/known_hosts
file .ssh/known_hosts
文件中 如果一切都应该是正确的但是它仍然无法正常工作,请确保您的项目是在您配置的从站上构建的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.