linux – 不能“git pull” – 主机密钥验证失败

前端之家收集整理的这篇文章主要介绍了linux – 不能“git pull” – 主机密钥验证失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有root访问我们的生产服务器,并且我想将git中的最新版本部署到服务器上,但是当我想要更新的文件夹“git pull”时,我遇到错误.

我已经浏览了一下,但是找不到明确的答案.

分段服务器在同一台机器上运行,但是在不同的文件夹中,当我拉那个文件夹时,一切正常.

对于Linux而言,我不是很有经验,所以请帮忙解决一下如何解决这个问题的明确答案:-)

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

附:
这在过去一直有效,所以我假设它与SSH密钥有关

错误

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       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: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.

所以这是执行在那里建议的命令的问题:

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

猜你在找的Linux相关文章