Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multi Account Git
ssh-keygen -t rsa
ssh-add ~/.ssh/id_rsa

ssh-keygen -t rsa -C "companyName" -f "companyName"
ssh-add ~/.ssh/companyName
nano ~/.ssh/config
Host bitbucket.org
  HostName bitbucket.org
  IdentityFile ~/.ssh/id_rsa
Host companyname.bitbucket.org
  HostName bitbucket.org
  IdentityFile ~/.ssh/companyName
Host github.com
  HostName github.com
  IdentityFile ~/.ssh/id_rsa
Host companyname.github.com
  HostName github.com
  IdentityFile ~/.ssh/companyName
git clone git@bitbucket.org:yourPersonalAccount/pet-project.git
git clone git@bitbucket.org:companyName/company-project.git
git clone git@companyname.bitbucket.org:companyName/company-project.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.