Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 725 Bytes

10-ssh-auth.md

File metadata and controls

34 lines (27 loc) · 725 Bytes

SSH authentication in GitHub

Original instruction

  1. Generate SSH key
ssh-keygen

Select file location, passphrase (I prefer empty)

  1. Copy the key
cat "$HOME/.ssh/id_rsa.pub" | pbcopy
  1. Visit GitHub Settings and add the key Example:
Title:
Personal Macbook Air 2015

Key:
ssh-rsa AAA...JaE= [email protected]
  1. Replace HTTPS remotes with SSH
git remote remove origin
git remote add origin [email protected]:fs/rails-base-graphql-api.git

Pros:

  1. Secure
  2. Don't need to log in every time