git push origin报错信息:

Unable to negotiate with 47.96.92.201 port 29418: no matching host key type found. Their offer: ssh-rsa,ssh-dss
fatal: Could not read from remote repository.

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

报错原图片 :

 

git remote -v发现有远程,且试过重置user.name user.email 重新生成过ssh都不管用,然后注意到报错中提示:their offer:ssh-rsa,ssh-dss,去网上找方法,介绍这种情况的原因就是新的ssh客户端不支持ssh-rsa算法,要修改本地配置重新使用ssh-rsa算法。

参考文章:

记一次使用git报错,解决Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa - 呆贝斯 - 博客园 (cnblogs.com) 

解决方法:ssh文件夹中添加config文件 

config文件内容:

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

 再试就可以提交了。

 

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐