【已解决】Unable to negotiate with XXX port : no matching host key type found. Their offer: ssh-rsa

一、场景

克隆代码库发生报错

二、具体报错信息

Unable to negotiate with XXX port : no matching host key type found. Their offer: ssh-rsa,ssh-dss

三、解决方案

# 首先保证在主目录下方,如果不是先运行: cd ~

cd .ssh
vim config

如果没有.ssh目录就新建一个运行:mkdir .ssh

然后往config文件中添加以下信息:

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

再次尝试即可成功

 

猜你喜欢

转载自blog.csdn.net/qq_36936730/article/details/129663717
今日推荐