- open a terminal in anywhere.
- Type as:
git config --global user.name "yourName" git config --global user.email "yourEmail"
-
open a terminal in anywhere.
-
Type as:
ssh-keygen -t ed25519 -C "your_email@example.com"
-
At the prompt, type a secure passphrase.
NOTE: Must remember this passphras, you will need it later.
-
Adding your SSH key to the ssh-agent
4.1 Start the ssh-agent in the background.
eval "$(ssh-agent -s)"
4.2 Add your SSH private key to the ssh-agent.
ssh-add ~/.ssh/id_ed25519
-
Add the SSH key to your account on GitHub.
5.1 Select and copy the contents of the id_ed25519.pub file
cat ~/.ssh/id_ed25519.pub
5.2 In the upper-right corner of any page, click your profile photo, then click Settings.
5.3 Open In the "Access" section of the sidebar, click SSH and GPG keys. Then Click New SSH key.
5.4 Paste your public key into the "Key" field.