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

最近便用腾迅工蜂,想推送代码,git push -u origin master 结果报以下的错误 Unable to negotiate with 106.52.160.162 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客户端不支持ssh-rsa算法,要修改本地配置重新使用ssh-rsa算法。

具体做法:到当前用户目录下的.ssh文件中创建config文件(config没有后缀)

并添加以下 Host * HostkeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa

然后再次提交 然后yes 确认 再次提交就可以了

如果有什么问题及不懂的可以于关注公众号 回复999加我微信交流下

六月七
请先登录后发表评论
  • latest comments
  • 总共0条评论