Skip to content

Instantly share code, notes, and snippets.

@oliveira-andre
Created March 28, 2021 00:15
Show Gist options
  • Select an option

  • Save oliveira-andre/40523dca7457e6d63370d1250f6268b0 to your computer and use it in GitHub Desktop.

Select an option

Save oliveira-andre/40523dca7457e6d63370d1250f6268b0 to your computer and use it in GitHub Desktop.
Managing SSH keys

Managing SSH keys

generate default key

ssh-keygen

generate the corp key

ssh-keygen -f ~/.ssh/id_rsa_corp

now edit the $HOME/.ssh/config

Host *
  HostName *
  User *
  IdentityFile ~/.ssh/id_rsa
  IdentitiesOnly yes

Host git-corp
  HostName bitbucket.org
  User andre.oliveira
  IdentityFile ~/.ssh/id_rsa_corp
  IdentitiesOnly yes

now you can use host like this

git clone [email protected]:git-corp/project.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment