Skip to content

Instantly share code, notes, and snippets.

@potikanond
Last active August 27, 2018 15:14
Show Gist options
  • Save potikanond/99d52b9f0089b9f7398ed5fa0f7995ce to your computer and use it in GitHub Desktop.
Save potikanond/99d52b9f0089b9f7398ed5fa0f7995ce to your computer and use it in GitHub Desktop.
How to add SSH key to GitHub

How to add SSH key to GitHub

Generate a SSH key

$ ssh-keygen

This will generate ssh private/public key inside the ~/.ssh/.

To get the public key:

$ cat ~/.ssh/id_rsa.pub

Copy the public key and go to GitHub website. Click profile menu, Settings. In Personal Settings menu on the left, click SSH and GPG keys menu. On the right panel, click New SSH key button then add your public key.

Now we can access personal GitHub repositories without username and password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment