windows git更新后连接远程仓库失败
背景:
不小心把git升级到了版本 git version 2.34.1.windows.1
然后连接远程仓库时报错如下
报错:
Unable to negotiate with 161.117.7.xx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss fatal: Could not read from remote repository.
检查key:
cat ~/.ssh/id_rsa.pub
之前配置的id_rsa.pub还存在的,且仓库配置没有变化,判断应该是版本变更git的变化导致的。
原因:
The latest OpenSSH version disables RSA.
解决:
vim ~/.ssh/config
添加如下而配置
Host * HostkeyAlgorithms +ssh-rsa PubkeyAcceptedAlgorithms +ssh-rsa