Multiple ssh keys for Github how to set?

Need neskolok keys from different accounts on the same machine. Plugging occurred in the compilation config file. I found these options: Host home.github.com and Host github.com-home

As it is necessary? It is both the working version?
Then how to use it? Then how to choose a key under which to commit to? Can someone tell me how to configure so as not to screw up?
June 26th 19 at 14:09
2 answers
June 26th 19 at 14:11
what key commit

Can still book for the beginning say? That would not screw up then. Judging by your question, you even don't own terminology (podskazochku: to create commits, ssh is not needed).

As it is necessary? It is both the working version?

And you test tried?
June 26th 19 at 14:13
There is a possibility to register different keys for different hosts, Yes. How to do it - Google will show many variations.
But the commits you're doing from the user in the system, which actually makes these commits. Ie commits and SSH connection are completely unrelated.
You find it easier to have two users and different keys, and do these commits separately from different users.
But why ?
garbage: the user in the system and the author komitov are not connected. - kavon.Murphy commented on June 26th 19 at 14:16
: so even the author of the commit is not related to committer. - sister58 commented on June 26th 19 at 14:19
: well, Yes of course. GIT from the sky takes the information about it. - mohamed.Muller commented on June 26th 19 at 14:22
another not mastered the documentation. - kavon.Murphy commented on June 26th 19 at 14:25
: what? That email and the name of the committer is stored in the file ./gitconfig? Well, this file is stored in a particular user of the system (unless explicitly specified otherwise). Not in some abstract parallel world, namely in your home directory. That's in terms of commits.
And as for the other work - tell me where GIT takes the keys access when you connect via SSH? Again he takes from the user (unless explicitly specified otherwise).
So I strongly disagree that "the user in the system and the author komitov not connected.", they are associated config files and keys that are stored at the user, because without them he will not be able to connect without password via SSH (for example) will not be able to pull the configuration (unless of course she's not one for the whole system for everyone). - mohamed.Muller commented on June 26th 19 at 14:28
: well, okay, in order:
> Is that email and the name of the committer is stored in the file ./gitconfig? Well, this file is stored in a particular user of the system (unless explicitly specified otherwise). Not in some abstract parallel world, namely in your home directory.
the fact of the matter is that this data can be stored not only in ~/.gitconfig.

> from GIT takes the keys access when you connect via SSH? Again he takes from the user (unless explicitly specified otherwise).
again, the keys can be stored anywhere.
in addition, access to the Gita may be generally open or password, and not keys.

using one system user can be comicity in different git 100500-100500 accounts under different names. - kavon.Murphy commented on June 26th 19 at 14:31

Find more questions by tags GitSSHGitHub