first step:
Install git. Open the terminal and enter the command
sudo apt-get install git
The second step:
Configure the two important information of this machine git, user.name and user.email, enter the following command in the terminal to set
git config --global user.name "Your Name"//user name
git config --global user.email "*************@qq.com"//Email address
After executing the above command, use the command git config --list to check whether the setting is successful.
third step:
Check whether there is a .ssh directory under the directory /home/greatwall. Generally, there is no .ssh directory. You need to type the command to generate this directory, and enter it in the terminal
(It is recommended not to use the root user, first switch user su greatwall (created user), then I cd to the /home/greatwall directory) and proceed as follows)
ssh-keygen -t rsa -C "**********@qq.com" //The mailbox is set in the second step above. Then press Enter all the way, in fact, no password is set. Then you will see that there are more .ssh directories in the home directory.
Step 4:
Enter the .ssh directory and you will see two files id_rsa and id_rsa.pub, id_rsa is the private key, id_rsa.pub is naturally the
public key. Then (vi /home/greatwall/.ssh/id_rsa.pub my project entry method) all we need to do is to copy the content in the id_rsa.pub file.