DEV Community

Discussion on: How to Setup Multiple Ssh Keys for Multiple Github/Bitbucket accounts.

Collapse
 
stanzilla profile image
Benjamin Staneck • Edited

Not sure what I am doing wrong but I always get ERROR: Repository not found. when I try the company version.

My SSH config:

Host company.github.com
  HostName github.com
  IdentityFile ~/.ssh/id_rsa_company
  PreferredAuthentications publickey

Host github.com
  HostName github.com
  IdentityFile ~/.ssh/id_rsa_gmail
  PreferredAuthentications publickey

And I clone with git clone git@company.github.com:company/repo.git

I've verified that both keys are loaded in the ssh agent.

EDIT: Fixed by the good 'ol turning it off and on again, perfect! Thanks for your guide :)

Collapse
 
shostarsson profile image
Rémi Lavedrine

Very happy that it worked.