Hudson 无法从 git 存储库获取
我有一个 Hudson 服务器和一个 git 存储库,它们都在我们的服务器(ubuntu 机器)上运行。
每当我尝试与哈德森一起构建我的应用程序时,他都会说以下
Iniciado pelo usuário anonymous
Checkout:workspace / /usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson.remoting.LocalChannel@176150c
Using strategy: Default
Checkout:workspace / /usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson.remoting.LocalChannel@176150c
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://[email protected]/git/germantech.git
ERROR: Problem fetching from servidor / servidor - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: git fetch -t ssh://[email protected]/git/germantech.git +refs/heads/*:refs/remotes/origin/*
Command "git fetch -t ssh://[email protected]/git/germantech.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Host key verification failed.
fatal: The remote end hung up unexpectedly
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
我在这里缺少什么? 有想法吗?预先感谢
编辑
好的,成功了!
首先,我使用我的 hudson 用户登录 (sudo su - -s /bin/bash tomcat6
),然后删除了我的 .ssh 文件夹。
之后,我只是按照这个链接,进行了无密码的ssh登录
现在,Hudson 无需指定密码即可进行提取
I have a Hudson server, and a git repository, both running on our server (an ubuntu machine).
Whenever I try to build my app with hudson, he says the follwing
Iniciado pelo usuário anonymous
Checkout:workspace / /usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson.remoting.LocalChannel@176150c
Using strategy: Default
Checkout:workspace / /usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson.remoting.LocalChannel@176150c
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://[email protected]/git/germantech.git
ERROR: Problem fetching from servidor / servidor - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: git fetch -t ssh://[email protected]/git/germantech.git +refs/heads/*:refs/remotes/origin/*
Command "git fetch -t ssh://[email protected]/git/germantech.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Host key verification failed.
fatal: The remote end hung up unexpectedly
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
what am i missing here?
Ideas? thanks in advance
EDIT
Ok, made it work!
first, i've logged with my hudson user (sudo su - -s /bin/bash tomcat6
) and then, i've deleted my .ssh folder.
after this, i just followed this link, and made a ssh login without password
now, hudson can do a fetch without have to especify a password
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要在 hudson 和 git 服务器之间创建 ssh 关系。
您只需执行一次此操作。
步骤:
使用 hudson 用户登录 hudson 机器。
创建 ssh 私钥和公钥:
ssh-keygen -t dsa
留下一个空的密码。
现在,您在 hudson home 的 .ssh 文件夹下有 2 个文件:id_dsa 和 id_dsa.pub。
使用以下方法将密钥复制到您的存储库:
ssh-copy-id -i ~/.ssh/id_dsa.pub [电子邮件受保护]
注销并验证您现在可以ssh 无需提供密码。
Hudson 现在应该能够连接。
You need to create an ssh relationship between hudson and git server.
You only need to do this once.
Steps:
Log in in the hudson machine with the hudson user.
create a ssh private and public key:
ssh-keygen -t dsa
Leave an empty passphase.
Now you have 2 files in the hudson home under the .ssh folder: id_dsa and id_dsa.pub.
Copy the key to your repo using:
ssh-copy-id -i ~/.ssh/id_dsa.pub [email protected]
Log out and verify you can now ssh without having to provide a password.
Hudson should now be able to connect.
我删除了
tomcat6
主文件夹中的.ssh
文件夹(hudson 在这里使用 tomcat6 用户运行,因为我使用 hudsons 的 war),然后使用 这个教程终于成功了I deleted the
.ssh
folder insidetomcat6
home folder (hudson runs with tomcat6 user here, because I use hudsons's war) and then, used this tutorial and it finally worked