windows git ssh 方式提示 no matching host key type found. Their offer: ssh-rsa,ssh-dss

Git提示: Unable to negotiate with xxx.xxx.xxx.xxx port XX: no matching host key type found. Their offer: ssh-rsa,ssh-dss fatal: Could not read from remote repository.

解决:

前提: 在排除没有配置公钥的情况下。

  1. 在Git的安装目录下 Git > etc > ssh 文件夹下找到 ssh_config 文件 。
  2. 在文件末尾添加一下代码。
# 注意这里的 xxx.com 是没有 https:// 的
# 如 https://github.com/, 填写 github.com 即可(最后的斜杆也不能要)。
Host xxx.com
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容