Skip to content

Instantly share code, notes, and snippets.

@zfarbp
Last active October 1, 2019 21:42
Show Gist options
  • Save zfarbp/b8761f9ea128ec80cbaef5f5c83feaa1 to your computer and use it in GitHub Desktop.
Save zfarbp/b8761f9ea128ec80cbaef5f5c83feaa1 to your computer and use it in GitHub Desktop.
Git with SSH key
# Genrate keys
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
-----------------------------------------------------------
# Edit ~/.ssh/config
Host your.hostname.com
Hostname github.com
User git
IdentityFile ~/.ssh/id_rsa
-----------------------------------------------------------
# Add Identity without Keychain
# There may be times in which you don't want the passphrase stored in the keychain,
# but don't want to have to enter the passphrase over and over again.
$ ssh-add ~/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment