I create a deploy
user, generate an ssh_key, I add id_rsa.pub as github deploy key.
this deploy
user need pull 2 repo, so I add the same ssh_key to another repo as deploy key.
but github tell me, deploy key already in use.
and I don't know how add 2 id_rsa.pub for 1 user.
update:
I add id_rsa_assets additional, but I still cannot pull.
ssh-add .ssh/id_rsa_assets
Could not open a connection to your authentication agent.
.ssh/config
Host guardians
Hostname github.com
User git
IdentityFile ~/.ssh/id_rsa
Host assets
Hostname github.com
User git
IdentityFile ~/.ssh/id_rsa_assets
You can create two public/private keys with whatever name you want:
(Ie it doesn't have to be named
id_rsa(.pub)
to work, provided you indicate ssh where to look.That is where '
config
' comes into play: theconfig
file includes the name of your two connections for GitHubrepo1
and GitHubrepo2
with, for each connection, the path to your private repo key, as described in "change github account mac command line" and in "Quick Tip: How to Work with GitHub and Multiple Accounts":That way you can pull from any of the two repos, as long as you are using their ssh addresses.