Git is hassling me with the usual
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
to which I usually respond with
git config user.email "me@example.com"
git config user.name "Me Name"
I don't wish to set the above globally as I have multiple hosts and wish to use a different Git identity for each SSH host. Is it possible to link the Git identities to the SSH hosts and/or identities, e.g. by having some sort of common config file
Host github.com
IdentityFile ~/.ssh/github_rsa
user.email "me@example.com"
user.name "Me Name"
Host gitlab.com
IdentityFile ~/.ssh/gitlab_rsa
user.email "another@example.com"
user.name "Another Name"