I have a Git repository that gets pushed to different remotes.
cd soCoolItHasToBeDuplicated;
git remote add foo git@github.com/...
git push foo;
git remote add bar git@github.com/...
git push bar;
Now, the repo has some SSH key configured.
But GitHub prevents the same SSH key to be reused for other user.
So I need to use other SSH key for the other repo.
There is the GIT_SSH_COMMAND
var to use different SSH key. But I would like this to work transparently, without additional variable or script.
Basically what I am looking for is something like:
git remote set-key foo ~/.ssh/id_rsa-github-foo
Is there something such?
(I know GitHub specifically has organizations and stuff. I want a vanilla git
solution.)