您的位置:首页 > 新闻 > 热点要闻 > git迁移之后需要做的操作

git迁移之后需要做的操作

2024/10/5 14:46:48 来源:https://blog.csdn.net/dataiyangu/article/details/140228626  浏览:    关键词:git迁移之后需要做的操作

背景

公司xx云到期,需要迁移环境

自己提测的时候遇到了相关的问题记录下

记录

执行push报错如下

https://www.cnblogs.com/52php/p/6637221.html@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for [git.ccc.con]:2222 has changed,
and the key for the corresponding IP address [12xxx:xxx210]:36000
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:mnqN0h00k.
Please contact your system administrator.
Add correct host key in /Users/leesin/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/leesin/.ssh/known_hosts:31
RSA host key for [xxx]:36000 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.

针对第二个问题,还有另外一个说法:

ssh-keygen -R xxx.xxx.xxx.xxx (服务器ip地址)

目的是清除你当前机器里关于你的远程服务器的缓存和公钥信息,注意是大写的字母“R”。
详情看:https://blog.csdn.net/ouyang_peng/article/details/81536396

但是我尝试了很多次没有成功。

于是尝试另一种说法https://www.cnblogs.com/52php/p/6637221.html 直接删掉这个缓存文件。于是乎成功了。

总结

公司的运维发布了邮件由xx:xx:xx:xx迁移到xx:xx:xx:xx

①修改自己的hosts文件为运维邮件中的内容
②rm ~/.ssh/known_hosts

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com