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

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

From
Robin H. Johnson <robbat2@gentoo.org>
Date
Oct 9, 2011, 22:57 UTC
Message-ID
<robbat2-20111009T225253-591026811Z@orbis-terrarum.net>
In-Reply-To
<4E8EBAFE.8020805@drmicha.warpmail.net>
On Fri, Oct 07, 2011 at 10:40:30AM +0200,  Michael J Gruber wrote:
Show 16 quoted lines
> [readding JCH to cc whom you dropped]
> Robin H. Johnson venit, vidit, dixit 07.10.2011 00:24:
> > On Wed, Oct 05, 2011 at 05:56:55PM -0700,  Junio C Hamano wrote:
> >> And this uses the gpg-interface.[ch] to allow signing the commit, i.e.
> >>
> >>     $ git commit --gpg-sign -m foo
> >>     You need a passphrase to unlock the secret key for
> >>     user: "Junio C Hamano <gitster@pobox.com>"
> >>     4096-bit RSA key, ID 96AFE6CB, created 2011-10-03 (main key ID 713660A7)
> >>
> >>     [master 8457d13] foo
> >>      1 files changed, 1 insertions(+), 0 deletions(-)
> > I like it, but I have a couple of questions: 
> > 1. Are the sig lines used in computed SHA1/commitid of a given commit (I
> >    see examples w/ --amend and that would usually change the SHA1)?
> Yes, just like with tag objects.

Ok, at the core, this is going to pose a problem with multiple signatures.

Workflow example:
1. Dev1 creates a commit, signs it, pushes to central repo.
2. Dev2 pulls, signs the tip commit, pushes it back.

Since signing model here actually alters the commit, the push by Dev2 loses the history point of a commit with only a single signature, like if somebody pushes a rewritten history (which should usually be prohibited).

The push certificate variant of signing does permit this case without breaking history.

Show 8 quoted lines
> > I think this isn't a replacement for push certificates, but has value in
> > itself. It's certainly provides better integration than the
> > signature-in-note variants.
> > 
> 
> I do think it's meant as an implementation of push certificates. I don't
> see any other value in it which could not be achieved by signed tags.
> Can you describe any?
Identify of the committer for verification.
-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Previous: Michael J GruberNext: Junio C Hamano
Message 11 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.