Ubuntu下 git 报ssh key错误

先贴错误:


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for sh.gitlab.XXX.com has changed,
and the key for the corresponding IP address 192.168.44.118
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
SHA256:o1zEE5aNu0bCOdZ5//Qgzr0/gcDT2yA7Ko2xR5BnedA.
Please contact your system administrator.
Add correct host key in /home/XXX/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/XXX/.ssh/known_hosts:5
remove with:
ssh-keygen -f "/home/XXX/.ssh/known_hosts" -R "sh.gitlab.XXX.com"
ECDSA host key for sh.gitlab.XXX.com has changed and you have requested strict checking.
Host key verification failed.
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。

删了~/.ssh/known_hosts 变成需要输入gitlab密码。。我谢谢嗷

然后手动把域名添加到


ssh-keyscan -t rsa sh.gitlab.sihuatech.com >> ~/.ssh/known_hosts

解决

posted @   fengyujia  阅读(74)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示