git pull push 报错 no matching host key type found. Their offer ssh-rsa

云效2020 git pull push 报错 no matching host key type found. Their offer: ssh-rsa

$ git pull
Unable to negotiate with X.x.x.x port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

解决方案:

#进入系统 ~/.ssh/config目录
#创建config文件
#写入
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

错误原因:OpenSSH 7.0 及更高版本同样禁用了 (DSA) 公钥算法

image-20220610104210117

文章来源:刘俊涛的博客 欢迎关注公众号、留言、评论,一起学习。


若有帮助到您,欢迎捐赠支持,您的支持是对我坚持最好的肯定(_)

posted @ 2022-06-10 10:43  刘俊涛的博客  阅读(1768)  评论(0编辑  收藏  举报