Remember to report an error using git and solve the problem Unable to negotiate with **** port 22: no matching host key type found. Their offer:...

I. Introduction:

Reinstall the Windows computer system, go to the official website to download the latest git installation, next all the way down, open bash and set up the old way to generate the public key

git config --global user.name "yourname"

git config --global user.email "[email protected]"

ssh-keygen -t rsa -C "[email protected]"

Add the public key to Alibaba Cloud. When cloning the code, it cannot be pulled down and an error is reported.

Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.

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

Check that you have developer rights. Resetting the public key and then adding it will not work. Go online to find a method. The reason for this is that the new ssh client does not support the ssh-rsa algorithm. You need to modify the local configuration and use ssh-rsa again. algorithm.

picture.png

2. Solution:

Specific method: Create a config file in the .ssh file in the current user directory (config has no suffix), open it with Notepad and add the following

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa



 

Guess you like

Origin blog.csdn.net/a2367994141/article/details/129418128