News for hackers. Stuff that matters.
Re:Use multiple Git SSH identities on a single computer by CraigJPerry on Thursday July 20, 2023 @09:13AM (#36799960)
You don’t need tools for this, run this command once and you’ll never have to worry about using the wrong key for that git repo again:

    cd <git repo>
    git config --local core.sshCommand "ssh -i ~/.ssh/id_<private key to use>"
Job done.
Re:Use multiple Git SSH identities on a single computer by pinhead on Thursday July 20, 2023 @11:17AM (#36801768)
Using `git config` is great. Another option since I don't always remember that command is `export GIT_SSH_COMMAND="ssh -i <private-key>"`

https://git-scm.com/docs/git#Documentation/git.txt-codeGITSS...

Re:Use multiple Git SSH identities on a single computer by ozim on Thursday July 20, 2023 @03:29PM (#36805531)
Even better, you can set identity as email or commit creator per repo and use private key per machine. Instead of making multiple private keys and god forbid copy these over to other machines.