Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 940 Bytes

connecting-to-github-with-ssh.md

File metadata and controls

40 lines (34 loc) · 940 Bytes

connecting to GitHub with SSH

Generate a new SSH key

ssh-keygen -t rsa -b 4096 -C "[email protected]"

Add your SSH key to the ssh-agent

  1. Edit the ~/.ssh/config file
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
  1. Start the ssh-agent in the background
eval "$(ssh-agent -s)"
> Agent pid 59566
  1. Add your SSH private key to the ssh-agent
ssh-add --apple-use-keychain ~/.ssh/id_rsa

Add your SSH key to your GitHub account

  1. Copy the SSH key to your clipboard
pbcopy < ~/.ssh/id_rsa.pub
  1. Go to GitHub > Settings > Access > SSH and GPG keys > New SSH key
  2. Paste the SSH key to the key field
  3. Click Add SSH key

Authorizing an SSH key for use with SAML single sign-on

  1. Go to GitHub > Settings > Access > SSH and GPG keys
  2. Click Configure SSO
  3. Click Authorize