git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] commit: teach --gpg-sign option

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Oct 6, 2011, 18:44 UTC
Message-ID
<4E8DF6F6.3000706@drmicha.warpmail.net>
In-Reply-To
<vpqfwj6xceo.fsf@bauges.imag.fr>
Matthieu Moy venit, vidit, dixit 06.10.2011 19:22:
Show 33 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> writes:
> 
>> I probably missed some earlier discussion (so please forgive me this),
> 
> (same here)
> 
>> What happens if my old key is compromised and I want to throw away the
>> signatures and replace them with signatures using my new key?
> 
> With the patch we're discussing, signatures are part of history, hence
> can't be modified after the fact without rewritting them.
> 
> *But*, by design, unless sha1 itself is compromized (in which case Git
> would need to change to another hash function, that would be no fun),
> signing the tip of every branch is sufficient to sign the whole history.
> 
> So, your old signatures would remain there, and your new signature, for
> new commits, would be added on top.
> 
>> How does this relate to the "push certificate" use case, which seemed
>> to be mostly about authenticating published branch tips with
>> signatures that are not necessarily important in the long term?
> 
> I'm wondering how this feature would fit in a typical flow, indeed.
> Usually, I hack for a while, and when I'm happy enough, I push. But I
> don't take the decision of what to push at commit time, so if the idea
> is to sign only a few commits (i.e. the ones you push), then you should
> decide this at commit time ("hmm, I should commit --gpg-sign this time
> because I'm going to push this one").
> 
> If the idea is to sign every commit, then there should be a config
> option so that we don't have to type it every time.
> 
Same concerns here. You can always
git commit --amend --gpg-sign

the commit at the tip, of course, and can even set things up to have push do this or remind you thereof.

I really liked the signatures as notes (because I feel those signatures are attachments after the fact, not part of the commit) but can see how distributing and merging them is non-trivial, and similarly checking them at a point in time when they are not in a notes tree yet.

Michael
Previous: Matthieu MoyNext: Junio C Hamano
Message 5 of 35 in “commit: teach --gpg-sign option”
  1. commit: teach --gpg-sign optionJunio C Hamano, Oct 6, 2011
  2. Shawn PearceOct 6, 2011
  3. Jonathan NiederOct 6, 2011
  4. Matthieu MoyOct 6, 2011
  5. Michael J GruberOct 6, 2011
  6. Junio C HamanoOct 6, 2011
  7. Robin H. JohnsonOct 6, 2011
  8. Michael J GruberOct 7, 2011
  9. Nguyen Thai Ngoc DuyOct 7, 2011
  10. Michael J GruberOct 9, 2011
  11. Robin H. JohnsonOct 9, 2011
  12. Junio C HamanoOct 9, 2011
  13. Robin H. JohnsonOct 11, 2011
  14. Michael J GruberOct 9, 2011
  15. Junio C HamanoOct 9, 2011
  16. Michael J GruberOct 10, 2011
  17. Junio C HamanoOct 10, 2011
  18. Junio C HamanoOct 9, 2011
  19. Michael J GruberOct 10, 2011
  20. Junio C HamanoOct 10, 2011
  21. Michael J GruberOct 11, 2011
  22. 0/3 Signed-commitJunio C Hamano, Oct 19, 2011
  23. 1/3 Split GPG interface into its own helper libraryJunio C Hamano, Oct 19, 2011
  24. 2/3 commit: teach --gpg-sign optionJunio C Hamano, Oct 19, 2011
  25. 3/3 log: --show-signatureJunio C Hamano, Oct 19, 2011
  26. 0/5 Signed-commitJunio C Hamano, Oct 20, 2011
  27. 1/5 Split GPG interface into its own helper libraryJunio C Hamano, Oct 20, 2011
  28. 2/5 commit: teach --gpg-sign optionJunio C Hamano, Oct 20, 2011
  29. 3/5 log: --show-signatureJunio C Hamano, Oct 20, 2011
  30. 4/5 t7004: extract generic "GPG testing" bitsJunio C Hamano, Oct 20, 2011
  31. 5/5 test "commit -S" and "log --show-signature"Junio C Hamano, Oct 20, 2011
  32. 7/5 pretty: %G[?GS] placeholdersJunio C Hamano, Oct 22, 2011
  33. Elia PintoOct 22, 2011
  34. Junio C HamanoOct 22, 2011
  35. Junio C HamanoOct 10, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.