by reacweb · 3y ago · 0 comments
Host github_as_pulp
Hostname github.com
User git
IdentityFile ~/.ssh/pulp.../id_rsa
IdentitiesOnly yes
I just need to replace github.com by github_as_pulp on my clone command to use my second github account. As it remains in .git/config, it matches automatically when I cd between repositories.In another script, I have GIT_SSH_COMMAND="ssh -i /.../.ssh/id_rsa -F /dev/null" git archive --remote=git@bor...fr:ace/docsite.git master | tar xp docsiteapp
git and ssh are so versatile. I think that a little documentation is better than a new tool.
I have multiple SSH keys on my computer filling different roles (work, personal, niche hobby stuff). I set them up like you did, and then never think about it again.
Too many people don't enjoy reading the manpages.
But... I guess if you didn't want to type this and were okay with an additional dependency, gitid has the advantage that you just have to remember what identity is current.