5 ms·
a) is fine (which is what this "Gitmail" service provides), but shouldn't b) be preventable if you tied email addresses to the public keys uploaded by the user?
by parennoob 11y ago
a) is fine (which is what this "Gitmail" service provides), but shouldn't b) be preventable if you tied email addresses to the public keys uploaded by the user? So if I tried to push commits to Github with an email address that belongs to Linus Torvalds, Github should be able to reject the push based on the fact that I authenticated with a key pair that is not in Torvalds' keys.
(Perhaps I don't understand the way in which git pushes work well enough?)
- detaro 11y agoYou have to be able to push commits other people have made. E.g. if you work together in a different repo and then publish the result to github, one person pushes all the commits. Maybe GitHub should indicate more precisely who pushed the commit, but on the other hand that's often unnecessary noise as well. If you want to be able to trust the data in a commit, it has to be signed (which nearly nobody does, and AFAIK GitHub doesn't display)
- parennoob 11y ago> You have to be able to push commits other people have made. If you work together in a different repo and then publish the result to github, one person pushes all the commits. I completely missed that use case. Thanks for the explanation! You're right in that no one signs commits (unfortunately, including myself).
- willeyeam 11y agoSomeone should build a tool that autosigns your commits for you if you have proper SSH keys and emails.
- everfree 11y agoThere's an interesting discussion on Stack Exchange about whether it's useful to sign every commit: http://programmers.stackexchange.com/questions/212192/what-are-the-advantages-and-disadvantages-of-cryptographically-signing-commits-a http://programmers.stackexchange.com/questions/212192/what-a...
- cyphar 11y agoSigning commits bumps the size of the repo substantially. Not to mention that you then have to maintain your WoT connection in order to make sure people can verify that your key is actually yours (although you can use keybase for that).
- aaronbasssett 11y agoIt's not so much about who pushes the branch to a repo and more about verifying who made the commits within a push (as a single push could contain commits from multiple people) and for verifying commit authors we already have commit signing[1]. It's just a pity nobody uses it. [1]: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work