Step 1: Set Git global username and mailbox
Git config --global user.email git config --global user.emailCopy the code
Step 2: Generate the SSH public key
First type in the command
Ssh-keygen -t rsa -c "Your email"Copy the code
After the command is executed, you need to confirm the command three times
- First: Generate the public and private key file name (default is ok)
- Second: Generate certificate password (default is empty)
- Third time: Confirm the certificate password (default is blank)
You can just keep typing Enter, so you don’t need to add a password
This is success!!
Step 3: Check the public key ID_rsa.pub
cd ~/.ssh/
ls
cat id_rsa.pub
Copy the code