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

An error is reported when pulling the code:

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.

Solution:
1 Modify the ssh config file

sudo gedit /etc/ssh/ssh_config

Join under host

KexAlgorithms=+diffie-hellman-group1-sha1

2 Create a new config file
Create a new config file in the .ssh folder under the user directory, enter

Host *
KexAlgorithms +diffie-hellman-group1-sha1

3Solution under windows
Create a new config file under the .ssh folder in the user directory and add:

Host *
KexAlgorithms +diffie-hellman-group1-sha1

Guess you like

Origin blog.csdn.net/qq_27577263/article/details/121079629#comments_22674106