Linux:
ssh-keygen -t ed25519 && cat /home/YOUR_USERNAME/.ssh/id_ed25519.pub
MacOS:
ssh-keygen -t ed25519 && cat /Users/YOUR_USERNAME/.ssh/id_ed25519.pub
Copy the value from id_ed25519.pub
Go to : https://github.com/settings/keys
- New SSH Key
- Name the title
- Choose Authentication Key
- Paste the key value and submit.
Test your SSH Connection to Github:
ssh -T git@github.com
Clone:
git clone git@github.com:YOUR_USERNAME/YOUR_REPO.git
Set current project to SSH:
git remote set-url origin git@github.com:YOUR_USERNAME/YOUR_REPO.git
try git pull
or commit and push something.
Enjoy.