3
Error:
Fetching upstream changes from git@github.com:....../.........git
    ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
    hudson.plugins.git.GitException: Error performing command: git fetch -t git@github.com:....../......git +refs/heads/*:refs/remotes/origin/*
    Command "git fetch -t git@github.com:...../......git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Host key verification failed.
    fatal: The remote end hung up unexpectedly

我的评论:

  1. 我发现詹金斯构建在执行时失败

    git fetch -t git@github.com:...../......git +refs/heads/*:refs/remotes/origin/*
    
  2. 然后我将相同的命令粘贴到它成功执行的命令行上,很奇怪!

  3. 执行以下操作以确保密钥正常工作:

    ssh -T git@github.com
    Hi [username]! You've successfully authenticated, but GitHub does not provide shell access.
    

    建议在http://help.github.com/ssh-issues/

  4. 我确实尝试将生成的私有 ssh 密钥复制到 Jenkins 下的 .ssh 文件夹中

    cp -rf /root/.ssh /var/lib/jenkins/.ssh
    

    并将 .gitconfig 文件复制到 /var/lib/jenkins

    建议于:Jenkins 因 github “git clone”而失败

4

1 回答 1

0

固定的:

但是我在项目中没有任何密集的配置可以放松。所以删除它并重新创建另一个。而这一次............我刚刚登录系统并** DID NOT SUDO **创建 git config 。相反,只需执行 git config user.email "emailid@abc.com" 和 git config user.name "User name" 。jenkins 构建成功!

替代解决方案: .git 归 root 所有,而其他归 jenkins 所有。解决方法是:happy-coding.com/…</p>

于 2012-05-24T10:14:39.047 回答