When we need to synchronize Github remote repository, access private repository, or use [email protected]:xxx.git form clone repository… You need to add an SSH key on Github

Use the following method to generate a public key

cd ~/.ssh/
ssh-keygen
Copy the code

Then run cat /root/.ssh/id_rsa.pub to copy the output to Github – settings-ssh and GPS keys, as shown in Figure 1 (1) and figure 2 below

After that, you can happily exchange code with Git clone and so on 🎉