Skip to content

Instantly share code, notes, and snippets.

@Nixes
Created May 10, 2021 04:14
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 Nixes/1841ac29cb700d17a1e01ce724e49191 to your computer and use it in GitHub Desktop.
Save Nixes/1841ac29cb700d17a1e01ce724e49191 to your computer and use it in GitHub Desktop.
create and add ssh based git deploy key

Guide to create and use ssh key based git deployment

  1. Generate key with ssh-keygen, as path enter the same as suggested with a different filename of 'git'
  2. run sudo nano ~/.ssh/config and add contents like
# add bitbucket deployment key to identity file
Host bitbucket.org
    User git
    IdentityFile ~/.ssh/git
  1. dump public key to console with cat ~/.ssh/git.pub
  2. copy this key into the bitbucket/github add keys input

Done!

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