gpt4 book ai didi

linux - 无法 "git pull"- 主机 key 验证失败

转载 作者:IT王子 更新时间:2023-10-29 00:24:22 26 4
gpt4 key购买 nike

我有对我们的生产服务器的 root 访问权限,我想将最新版本的 git 部署到服务器,但是当我在要更新的文件夹上“git pull”时,我遇到了以下错误。

我浏览了一下,但找不到关于该做什么的明确答案..

登台服务器在同一台机器上运行,但只是在不同的文件夹中,当我在该文件夹上 pull 时一切正常。

我在 Linux 方面不是很有经验,所以请帮我明确回答如何修复:-)

否则我可以访问任何我需要的东西

附注这在过去有效,所以我假设它与 SSH key 有关

错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for www.site.org has changed,
and the key for the corresponding IP address x.x.x.x
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
*************
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:1
remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R gitlab.site.org
ECDSA host key for gitlab.site.org has changed and you have requested strict checking.
Host key verification failed.

最佳答案

在日志中您会看到以下文本:

(...)Please contact your system administrator.Add correct host key in /root/.ssh/known_hosts to get rid of this message.Offending ECDSA key in /root/.ssh/known_hosts:1remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R gitlab.site.orgECDSA host key for gitlab.site.org has changed and you have requested strict checking.Host key verification failed.

So it is a matter of performing the command that is suggested there:

ssh-keygen -f "/root/.ssh/known_hosts" -R gitlab.site.org

关于linux - 无法 "git pull"- 主机 key 验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21087695/

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