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

Re: GPG signing for git commit?

From
Sam Vilain <sam@vilain.net>
Date
Apr 6, 2009, 06:05 UTC
Message-ID
<49D99BB2.2090906@vilain.net>
In-Reply-To
<alpine.LFD.2.00.0904031535140.3915@localhost.localdomain>
Linus Torvalds wrote:
Show 14 quoted lines
> On Sat, 4 Apr 2009, Chow Loong Jin wrote:
>   
>> It crossed my mind that currently git commits cannot actually be
>> verified to be authentic, due to the fact that I can just set my
>> identity to be someone else, and then commit under their name.
>>     
>
> You can't do that.
>
> Well, you can, but it's always going to be inferior to just adding a tag. 
>
> The thing is, what is it you want to protect? The tree, the authorship, 
> the committer info, the commit log, what?
>   
[...]
Show 13 quoted lines
> Btw, there's a final reason, and probably the really real one. Signing 
> each commit is totally stupid. It just means that you automate it, and you 
> make the signature worth less. It also doesn't add any real value, since 
> the way the git DAG-chain of SHA1's work, you only ever need _one_ 
> signature to make all the commits reachable from that one be effectively 
> covered by that one. So signing each commit is simply missing the point. 
>
> IOW, you don't _ever_ have a reason to sign anythign but the "tip". The 
> only exception is the "go back and re-sign", but that's the one that 
> requires external signatures anyway.
>
> So be happy with 'git tag -s'. It really is the right way.
>   

Linus I agree with these points - I'd just like to point you to the new mirror-sync design document. Under Documentation/git-mirror-sync.txt on http://github.com/samv/git/tree/mirror-sync - and an implementation plan outlined in Documentation/git-mirror-sync-impl.txt

This system allows for *pushes* to be signed and in general laying the foundation for knowing that commits are authentic without the intrusion into the refs/tags/* space that making lots of signed tags would imply. The idea is to put 'packed-refs' contents (or a moral equivalent) in tag bodies. It is really a new type of object, but it's sufficiently similar to a tag that I thought I'd just go and go with that design for now. Anyway if you're curious take a look, otherwise wait for the formal submission once I've got something better together...

Sam
Previous: Linus TorvaldsNext: Robin H. Johnson
Message 3 of 17 in “GPG signing for git commit?”
  1. Chow Loong JinApr 3, 2009
  2. Linus TorvaldsApr 3, 2009
  3. Sam VilainApr 6, 2009
  4. Robin H. JohnsonApr 15, 2009
  5. Shawn O. PearceApr 15, 2009
  6. Robin H. JohnsonApr 15, 2009
  7. Shawn O. PearceApr 16, 2009
  8. Sitaram ChamartyApr 17, 2009
  9. Jeff KingApr 17, 2009
  10. Sitaram ChamartyApr 17, 2009
  11. Jeff KingApr 21, 2009
  12. Nguyen Thai Ngoc DuyMay 7, 2009
  13. Robin H. JohnsonMay 8, 2009
  14. Nguyen Thai Ngoc DuyMay 10, 2009
  15. Nguyen Thai Ngoc DuyMay 11, 2009
  16. Jakub NarebskiApr 7, 2009
  17. Linus TorvaldsApr 7, 2009

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.