gpt4 book ai didi

git - 检测到可能的 DNS 欺骗。远程主机标识已更改

转载 作者:太空狗 更新时间:2023-10-29 14:16:43 27 4
gpt4 key购买 nike

我最近更换了服务器,因此有了一个新的 IP 地址。当我尝试使用 git fetch [remote repository] 时,我得到了这个:

> C:\Users\[path]\app>git fetch [remote repository]
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> The RSA host key for example.net has changed, and the key for the
> corresponding IP address [IP address of new server] 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 RSA key sent by the remote host is
> SHA256:ep0A2t+sVMSaIEbS8wt8ptfmdHSr1kNocWsBNab0tsI. Please contact
> your system administrator. Add correct host key in
> /c/Users/[username]/.ssh/known_hosts to get rid of this message.
> Offending RSA key in /c/Users/[username]/.ssh/known_hosts:1 RSA host
> key for example.net has changed and you have requested strict
> checking. Host key verification failed. fatal: Could not read from
> remote repository. Please make sure you have the correct access rights
> and the repository exists. C:\Users\[path]\app>

我只需要从新服务器获取一个新的 SSH key 并将其放入我的本地计算机即可解决此问题,对吗?谢谢。

最佳答案

如果您实际上有一个新服务器并且您使用与旧服务器相同的名称或相同的 IP 引用它,那么 ssh 证书很可能不相同并且您会收到欺骗警告消息它。在消息中,您可以看到 ssh 指向旧证书信息所在的行:/c/Users/[用户名]/.ssh/known_hosts:1。长话短说:如果您更改了服务器,那么预计 ssh 证书会有所不同。只需从旧服务器的 ssh known_hosts 中删除该行(在本例中为文件的第一行)就可以了。

关于git - 检测到可能的 DNS 欺骗。远程主机标识已更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50628840/

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