Procedure 1 Open the TERMINAL and run the following command

git config --global user.name "superGG1990"Git config --global user.email"[email protected]"// This is your email addressCopy the code

2 Run CD ~/. SSH to check whether the directory is created using ssh-keygen

ssh-keygen -t rsa -C "[email protected]"// This is the email addressCopy the code

And then you type in whatever you need in there and of course you don’t have to type in your password but you have to make sure that no boring people are impersonating you, and then it looks like this, right

Your public key has been saved in /home/you/.ssh/id_rsa.pub.
The key fingerprint is: # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected]
Copy the code

Until there are three files in the.ssh folder

3. Add a public key to your remote repository

There are various methods for viewing public keys

(1) Input at the terminal

 cat ~/.ssh/id_rea.pub
Copy the code

(2) Find the corresponding file open copy all the code inside

4. Log in to Git and click SSH and GPG keys -> New SSH key

And then I’m going to copy it into the text field title whatever I want to call it and I’m going to do it by default

5 Click add key to verify that the command works properly. Run the following command on bash

ssh -T [email protected]
Copy the code

Successful if you see the following fields

Hi xxx! You've successfully authenticated, but GitHub does not # provide shell access.
Copy the code

Git git git git git git git git git

Git reset --hard HeAD^ git reset --hardCopy the code

Looking forward to the next time