no matching host key type found. Their offer: ssh-rsa,ssh-dss...

Unable to negotiate with 主机地址 port 端口号: 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中配置了ssh key,但是依然不能clone下代码。(肯定配置的无问题)

git 版本:git version 2.33.1.windows.1

不能正常clone代码:

解决办法:

①找到git安装目录(根据自己安装时选项,找到此目录)

②进入 etc目录,找到ssh目录

③再次进入ssh目录,找到 ssh_config 配置文件

④以文本形式打开ssh_config此文件,滑动到最下面

⑤新增自己git主机地址,后面的照着上面例子copy既可。

Host xxx.xxx.xx.com

HostkeyAlgorithms +ssh-rsa

PubkeyAcceptedAlgorithms +ssh-rsa

⑥配置完成后,保存配置文件后再次去clone代码

⑦最终,代码可以顺利下载下来了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容