- run
ssh-keygen
and press enter repeatedly until done. This creates a public/private key pair in~/.ssh/
- run
cat ~/.ssh/id_rsa.pub
to print out the public key - copy the key to your clipboard
- visit https://github.com/settings/keys and click [New SSH key] and paste your key when prompted
- You're done!
Now you can git clone
via ssh (make sure to copy the repository url for cloning using SSH instead of HTTPS).
The repository url should look like: [email protected]:user/repo.git