Complete error message

Error reason

I did a lot of research and decided that there was no SSH public key generated locally (or on the server)

The solution

The first step

When you do not have an SSH public key, enter the following command in Terminal:

ssh-keygen -t rsa -C "[email protected]"
Copy the code

Press Enter, and the following figure will appear. Regardless of the questions to be entered, press Enter, and the SSH public key will be generated. (Regenerating will overwrite the previous SSH public key)

The second step

Enter the following command in Terminal:

ssh -v [email protected]
Copy the code

The third step

Run the following command in Terminal:

ssh-agent -s
Copy the code

In Terminal, information similar to the following figure is displayed

The fourth step

Run the following command in Terminal:

$ ssh-add ~/.ssh/id_rsa
Copy the code

Note:

Some friends may have problems with the previous step, and the following information is displayed

If you encounter this problem, don’t panic. Type the following command in Terminal:

$ eval `ssh-agent -s`
Copy the code

Then type again:

$ ssh-add ~/.ssh/id_rsa
Copy the code

As shown, the problem has been solved! Perfect!

Step 5

Based on the SSH public key path information generated in Step 4, find id_rsa.pub, open it in text mode, and copy all the contents in it.

Once the copy is complete, go to your Gitee(code cloud), log in to your account, and follow the following steps to enter the heart:

If your email received the message, the public key was added successfully, and the problem is solved.