How to generate ssh key with git:
1.Set Git user name and email:
git config --global user.name “lval”
git config --global user.email “[email protected]”
2. Check if you already have the ssh key: cd ~/.ssh
cat .ssh/id_rsa.pub
3. Generate key: ssh-keygen -t rsa -C "[email protected]"
4. Enter the password
5. Find the generated key file
6. Log in to your git account and copy the contents of the generated key file to the ssh key to generate a new key.
7. The account login is successful and you can use the git command to pull the code.