PSA: Please sign your git commits [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2014-06-09T15:34:18+00:00


Summary:

With the release of Git 2.0, automatic commit signing is now possible with the 'commit.gpgsign' configuration option. However, there is a negative impact on speed when a large number of commits are involved. The context discusses the concept of multisig, which is beneficial for irreversible actions but not necessary most of the time. Although it has been implemented in bitcoin wallets, no PGP developer or user ever thought to implement it. In a mailing list discussion, Jeff Garzik emphasized that current multi-sig wallet technology is arguably more secure than PGP keyring. In an email exchange between Wladimir and Chris Beams, Chris suggests complying with commit signing for future commits but questions its effectiveness. In a conversation between Jeff Garzik and Wladimir, they discuss the security of multi-sig wallets compared to PGP keyrings.The email conversation between David A. Harding and Chris Beams discusses how to enable signing commits by default in Git. They mention the use of a script that can be added to .git/hooks/post-commit and post-merge to ensure proper signature of commit messages. In a discussion thread from 2014, Mark Friedenbach posed an honest question about the benefits of signed commits in Git. In a discussion on the use of commit signing in Git, Chris Beams expresses his willingness to comply with it while also questioning its efficacy. In an email from May 2014, Chris Beams expressed his desire for a way to enable signing Git commits by default and noted that most people would probably forget to do it. In an email exchange between Chris Beams and Wladimir J. van der Laan, the two discussed the idea of requiring signed commits in Github development process. A contributor to Bitcoin Core development, Chris, has responded to a request from Wladimir to sign git commits.Bitcoin Core developers are advised to sign their git commits as it helps in ensuring the integrity of the tree. To sign a commit, users need to provide the `-S` flag or `--gpg-sign` to git commit when committing changes. Users can also retroactively sign previous commits using `--amend`, or use the interactive rebase command with 'edit' to go back further. It is important to note that rewriting history will require resigning as signatures will be lost. To check if commits are signed, users can use git log with show-signature. Pieter Wullie has created a script that simplifies merging and signing and can be found in contrib/devtools. The script can be used to merge pull requests and drop users into a shell to verify changes and test.


Updated on: 2023-08-01T09:22:12.107933+00:00