哈德森不能从git仓库中获取 [英] hudson cannot fetch from git repository

查看:122
本文介绍了哈德森不能从git仓库中获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台Hudson服务器和一个git仓库,它们都运行在我们的服务器上(一台ubuntu机器)。

当我试图用哈德森构建我的应用程序时,他说了下面的内容

 使用匿名
结帐:workspace / /usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson。 remoting.LocalChannel@17​​6150c
使用策略:默认
签出:工作区/usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson.remoting.LocalChannel@17​​6150c
获取更改从远程Git存储库
从ssh获取上游更改://git@192.168.0.10/git/germantech.git
错误:从servidor / servidor获取问题 - 可能不可用。继续无论如何
错误:(底层报告):执行命令时出错:git fetch -t ssh://git@192.168.0.10/git/germantech.git + refs / heads / *:refs / remotes / origin / *
命令git fetch -t ssh://git@192.168.0.10/git/germantech.git + refs / heads / *:refs / remotes / origin / *返回状态码128:主机密钥验证失败。
致命:远程端意外挂起

错误:无法从任何存储库中获取
致命错误:无法从任何存储库中获取
hudson.plugins.git。 GitException:无法从任何存储库获取

我在这里丢失了什么?
想法?在此先感谢

编辑



好的,让它成功!

首先,我用我的哈德森用户( sudo su - -s / bin / bash tomcat6 )登录,然后我删除了我的.ssh文件夹。
在此之后,我只是遵循这个链接,并做了一个ssh登录而没有密码

现在,hudson可以在不必指定密码的情况下执行提取操作。

解决方案

您需要创建Hudson和git服务器之间的ssh关系。



您只需要执行一次操作即可。

步骤:


  1. 使用hudson用户登录哈德森计算机。


  2. 创建一个ssh私钥和公钥:

    ssh-keygen -t dsa

    留下一个空的通行证。

    现在您在.ssh文件夹下的hudson主目录中有2个文件:id_dsa和id_dsa.pub。


  3. 复制



    ssh-copy-id -i〜/ .ssh / id_dsa.pub hudson@gitserver.machine.com


  4. 注销并验证您现在可以在不提供密码的情况下ssh。

哈德森现在应该可以连接。


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://git@192.168.0.10/git/germantech.git
ERROR: Problem fetching from servidor / servidor - could be unavailable. Continuing anyway
ERROR:  (Underlying report) : Error performing command: git fetch -t ssh://git@192.168.0.10/git/germantech.git +refs/heads/*:refs/remotes/origin/*
Command "git fetch -t ssh://git@192.168.0.10/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

解决方案

You need to create an ssh relationship between hudson and git server.

You only need to do this once.

Steps:

  1. Log in in the hudson machine with the hudson user.

  2. 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.

  3. Copy the key to your repo using:

    ssh-copy-id -i ~/.ssh/id_dsa.pub hudson@gitserver.machine.com

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

Hudson should now be able to connect.

这篇关于哈德森不能从git仓库中获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆