背景
最近升级git到最新版 发现pull代码报错
$ git version git version 2.33.1.windows.1 $ git pull Unable to negotiate with 47.98.49.44 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-rsa的主机秘钥;也有一些报错的类型是 Their offer: ssh-dss
解决
在.ssh目录中新建config配置文件,内容如下:
Host * HostkeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa
参考
https://blog.csdn.net/gongjin28_csdn/article/details/120783931
本文链接:https://jeff.xin/post/124.html
--EOF--
发表于 2021-11-09 ,并被添加「 Git 」标签 。
Comments
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。