gpt4 book ai didi

git - 尽管生成了 key ,但 Jenkins 提示主机 key 验证失败

转载 作者:太空狗 更新时间:2023-10-29 14:24:30 25 4
gpt4 key购买 nike

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. 发现jenkins build执行时失败

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

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

    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 fails with github "git clone"

最佳答案

固定:

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

替代解决方案:.git 由 root 所有,而其他文件由 jenkins 所有。解决方法是:happy-coding.com/...

关于git - 尽管生成了 key ,但 Jenkins 提示主机 key 验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10723711/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com