我最近更换了服务器,因此我有了一个新的 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 密钥并将其放入本地计算机即可修复此问题,对吗?谢谢。
如果您实际上有一台新服务器,并且使用与旧服务器相同的名称或相同的 IP 来引用它,那么 ssh 证书很可能不相同,并且您会收到一条欺骗警告消息。在消息中,您可以看到 ssh 指向旧证书信息所在的行:/c/Users/[用户名]/.ssh/known_hosts:1。长话短说:如果您更改了服务器,那么 ssh 证书预计会不同。只需从旧服务器的 sshknown_hosts 中删除该行(在本例中为文件的第一行),就可以了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)