Using the SSH address to pull the remote warehouse code reports the following error

Note: After configuring the SSH key, using the SSH address to clone the code, the code still cannot be pulled, and the following message is displayed.
Their offer:ssh-rsa,ssh-dss fatal:Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

Insert image description here
Note that the warehouse address supports ssh-rsa and ssh-dss type keys;

Check key type

First, check what type of locally configured secret key it is, as follows:

Insert image description here

This is the ssh-rsa type. If not, you can type the following command to generate such a key pair;

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

Change to your email address, enter the command in the git command window and hit Enter three times in succession. Then you can find the generated secret key and public key in the .ssh directory;

Insert image description here

Configure warehouse IP

Okay, after the above configuration, use the SSH link to clone the code and report the initial error.You need to find the ssh_config configuration in the Git installation directory and add this configuration at the end of the configuration,inThe fuzzy part is the IP address of the remote warehouse. Do not add the port number. Do not type it by hand. Copy the previous one.

Insert image description here

At this point, it will be no problem to pull the code from the remote warehouse.

Guess you like

Origin blog.csdn.net/qq_42108331/article/details/132912613