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
我的评论:
我发现詹金斯构建在执行时失败
git fetch -t git@github.com:...../......git +refs/heads/*:refs/remotes/origin/*
然后我将相同的命令粘贴到它成功执行的命令行上,很奇怪!
执行以下操作以确保密钥正常工作:
ssh -T git@github.com Hi [username]! You've successfully authenticated, but GitHub does not provide shell access.
我确实尝试将生成的私有 ssh 密钥复制到 Jenkins 下的 .ssh 文件夹中
cp -rf /root/.ssh /var/lib/jenkins/.ssh
并将 .gitconfig 文件复制到 /var/lib/jenkins