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

Re: [RFC] Authenticate push via PGP signature, not SSH

From
Pierre Habouzit <madcoder@debian.org>
Date
Jan 29, 2008, 19:08 UTC
Message-ID
<20080129190845.GC30093@artemis.madism.org>
In-Reply-To
<20080129041000.GK24004@spearce.org>
On Tue, Jan 29, 2008 at 04:10:00AM +0000, Shawn O. Pearce wrote:
Show 12 quoted lines
> * PGP public key storage:
> 
>   Use a "hidden" ref called "refs/access-keys" to store a commit.
>   The access control change log is a normal Git commit chain.
> 
>   The tree under this commit stores a file per <email> string.
>   Public keys for auth line validation are located by <email>,
>   from the tip of this branch.
> 
>   This branch could be a symlink to another repository (e.g.
>   a site-wide "admin" repository) and the ODB for that other
>   repository could be an alternate for this repository.
  This won't work well, because I don't think GnuPG is able to check
some signature against an armored GPG public Key (at least I didn't
found a way to do that). You have to create one pubring per submitter,
wich is kind of a waste in fact, and the format is horribly binary.
  I don't even know if you really need the versionning of this
pseudo-keyring, and if a .git/keyring.gpg isn't enough.
  As a side note, you don't really need to use GIT_PUSH_*. It doesn't
make anything safer (as the UIDs of a given public key are public
information anyways), you just want to know which key signed that data,
and the signature holds that information. Hence if you still want to
have a flat-file based keyring (which I repeat I don't think gpg
supports directly -- and that's really a shame) you'd better index them
per key fingerprint than by author name.
  And then you just need to call gpg this way:

$ gpg --keyring path/to/the/keyring.gpg --quiet --batch --status-fd 1 --verify some-file.tar.gz.gpg 2>|/dev/null [GNUPG:] SIG_ID dw0VliO0DFjOQA3HUSHijYekQYY 2008-01-29 1201633002 [GNUPG:] GOODSIG BC6AFB5BA1EE761C Pierre Habouzit <pierre.habouzit@polytechnique.edu> [GNUPG:] VALIDSIG 72B4C59ADA78D70E055C129EBC6AFB5BA1EE761C 2008-01-29 1201633002 0 3 0 17 2 00 72B4C59ADA78D70E055C129EBC6AFB5BA1EE761C [GNUPG:] TRUST_ULTIMATE

  And if the key is not in your keyring this looks like:
$ GNUPGHOME=/tmp gpg --verify --status-fd 1 some-file.tar.gz.gpg 2>/dev/null
[GNUPG:] ERRSIG BC6AFB5BA1EE761C 17 2 00 1201633002 9
[GNUPG:] NO_PUBKEY BC6AFB5BA1EE761C
                   ^^^^^^^^^^^^^^^^
            that's the key id you look for.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 7 of 21 in “[RFC] Authenticate push via PGP signature, not SSH”
  1. Sam VilainJan 28, 2008
  2. Shawn O. PearceJan 28, 2008
  3. Jan HudecJan 28, 2008
  4. Sam VilainJan 28, 2008
  5. Shawn O. PearceJan 29, 2008
  6. Shawn O. PearceJan 29, 2008
  7. Pierre HabouzitJan 29, 2008
  8. Shawn O. PearceJan 30, 2008
  9. Sam VilainJan 30, 2008
  10. Shawn O. PearceJan 30, 2008
  11. Pierre HabouzitJan 30, 2008
  12. Sam VilainJan 30, 2008
  13. Johannes SixtJan 30, 2008
  14. Shawn O. PearceJan 31, 2008
  15. Pierre HabouzitJan 30, 2008
  16. Shawn O. PearceJan 31, 2008
  17. Pierre HabouzitJan 31, 2008
  18. Sam VilainJan 30, 2008
  19. Shawn O. PearceJan 30, 2008
  20. Sam VilainJan 31, 2008
  21. Pierre HabouzitJan 28, 2008

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.