no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

拉代码时候报错:

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

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

解决方法:
1修改ssh config文件

sudo gedit /etc/ssh/ssh_config

在host下加入

KexAlgorithms=+diffie-hellman-group1-sha1

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

Host *
KexAlgorithms +diffie-hellman-group1-sha1

3windows下解决方法
在用户目录下的 .ssh文件夹下新建一个 config 文件,添加:

Host *
KexAlgorithms +diffie-hellman-group1-sha1

版权声明:本文为qq_27577263原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。