Skip to content

Instantly share code, notes, and snippets.

@agalea91
Created June 16, 2020 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agalea91/069b31418ca61fcd3b1fc31181570cb9 to your computer and use it in GitHub Desktop.
Save agalea91/069b31418ca61fcd3b1fc31181570cb9 to your computer and use it in GitHub Desktop.
Example of an ~/.ssh/config file for github RSA deploy key auth for web app
# 1. Create new RSA key with "ssh-keygen"
# 2. Add as deploy key for repo on github
# 3. Add a new block to your ~/.ssh/config like below
# 4. Clone the repo with "git@github-repo-name:User/repo"
Host github.com
HostName github.com
IdentityFile /path/to/your/personal/github/private/key
Host github-repo-name
HostName github.com
IdentityFile /path/to/your/work/github/private/key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment