git 配置完下载不了代码,提示身份验证问题

git配置完后显示无法下载代码

Unable to negotiate with 192.168.2.151: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.

解决办法

1.在host下加入 
KexAlgorithms=+diffie-hellman-group1-sha1

2.还有一个办法 
在用户目录下的.ssh文件夹新建一个config文件 
输入

Host *
    KexAlgorithms +diffie-hellman-group1-sha1
posted @ 2022-04-03 17:22  胡鹏飞  阅读(322)  评论(0)    收藏  举报