Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
hudson无法从git存储库获取_Git_Tomcat_Hudson_Tomcat6 - Fatal编程技术网

hudson无法从git存储库获取

hudson无法从git存储库获取,git,tomcat,hudson,tomcat6,Git,Tomcat,Hudson,Tomcat6,我有一台Hudson服务器和一个git存储库,都运行在我们的服务器(一台ubuntu机器)上。 每当我尝试用hudson构建我的应用程序时,他说 Iniciado pelo usuário anonymous Checkout:workspace / /usr/share/tomcat6/.hudson/jobs/ECF/workspace - hudson.remoting.LocalChannel@176150c Using strategy: Default Checkout:worksp

我有一台Hudson服务器和一个git存储库,都运行在我们的服务器(一台ubuntu机器)上。
每当我尝试用hudson构建我的应用程序时,他说

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
我错过了什么? 思想?提前谢谢

编辑

好的,成功了
首先,我用我的hudson用户(
sudo su--s/bin/bash tomcat6
)登录,然后,我删除了我的.ssh文件夹。
在此之后,我只是按照链接进行了ssh登录,没有密码

现在,hudson可以在不指定密码的情况下进行提取

您需要在hudson和git服务器之间创建ssh关系

你只需要做一次

步骤:

  • 与hudson用户一起登录hudson机器

  • 创建ssh私钥和公钥:

    ssh-keygen-tdsa

    保留一个空的passphase。
    现在,在hudson主页的.ssh文件夹下有两个文件:id_dsa和id_dsa.pub

  • 使用以下方法将密钥复制到您的回购协议:

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

  • 注销并验证您现在可以使用ssh而无需提供密码


  • Hudson现在应该可以连接了。

    我删除了
    tomcat6
    主文件夹中的
    .ssh
    文件夹(Hudson在这里与tomcat6用户一起运行,因为我使用的是Hudson's war),然后使用了教程,它终于起作用了

    我已经登录到了“tomcat6”(sudo su--s/bin/bash tomcat6)用户,这是运行Hudson的用户。现在的错误如下:。我仍然无法通过ssh登录。在'sudo su--s/bin/bash tomcat6'之后,我尝试了'ssh 127.0.0.1',但ssh仍然询问我密码,不允许我登录。我在这里遗漏了什么?哈德逊河在哈德逊河下运行user@GermanAttanasioRuiz为什么我必须保持密码短语为空?它不能与密码短语一起使用吗?每次连接时都必须编写密码短语