We started using git as VCS, with previously using SVN, and found out that in git you can easily distuingish the real person behind changes and commits. Now we are wondering why this design choice was made and if there is a thing we overlook.
Let's asume the following things:
- Everybody has registered an ssh key to gitlab
- Commits are not signed with gpg
- Everybody uses git bash using the registered ssh key
Now as we all know the author
and committer
is just meta-data for git and can easily be spoofed like this:
- git config --global --add user.email Incognito@fake.com
- git config --global --add user.name "Incognito User"
- git commit -m "You don't know who I really am" --author="Max Mustermann "
- git push
The metadata for the commit would then look something like this:
Author: Max Mustermann <max.mustermann@company.com>
AuthorDate: Mon Jun 4 13:12:47 2018 +0200
Commit: Incognito User <Incognito@fake.com>
CommitDate: Mon Jun 4 13:13:26 2018 +0200
Now I thought there has to be a way to find the used ssh key or real person for the commit, since the terminal and the system know the key and thus the real person behind the commit and push.
Question: Is there no way at all to find out the real person without using gpg signing?
PS: No, we don't distrust each other to exploit this, but we are rather curious and want to understand.