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

猜你喜欢

转载自blog.csdn.net/qq_27577263/article/details/121079629#comments_22674106
今日推荐