不能够“推拉” - 主机密钥验证失败 [英] Not able to "git pull" - Host key verification failed

查看:678
本文介绍了不能够“推拉” - 主机密钥验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有权访问我们的生产服务器,我想将最新版本的git部署到服务器上,但当我更新我想要更新的文件夹时,我遇到了下面的错误。

I've got root access to our production server and I want to deploy the latest version in git to the server but I'm running into the error below when I "git pull" on the folder I want to update.

我浏览了一下,但找不到明确的答案。

I've browsed around a bit, but can't find a clear answer on what to do..

临时服务器运行在同一台计算机上,但只是在不同的文件夹中,当我<在该文件夹上拉时,它一切正常。

The staging server runs on the same machine, but just in a different folder and when I pull on that folder it all goes fine.

我在Linux上并不是很有经验,所以请帮助我解决如何解决问题的明确答案: - )

I'm not very experienced when it comes to Linux, so please help me out with a clear answer on how to fix :-)

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

Otherwise I have access to anything I need

ps
这在过去有效,所以我假设它与SSH密钥有关。

p.s. This has worked in the past, so I'm assuming it's got something to do with the 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.


推荐答案

在日志中可以看到以下文本:

In the log you see the following text:


(...)

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.

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

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

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

这篇关于不能够“推拉” - 主机密钥验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆