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

Re: [RFC] GPG-Signed pushes & commits: differentiating between no signature and an unknown key

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 2, 2016, 03:17 UTC
Message-ID
<xmqq1t8vu7gj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<robbat2-20160202T002257-169038640Z@orbis-terrarum.net>
"Robin H. Johnson" <robbat2@gentoo.org> writes:
Show 19 quoted lines
> On Mon, Feb 01, 2016 at 02:49:09PM -0800,  Junio C Hamano wrote:
>> Are you talking about something other than prepare_push_cert_sha1()?
> I went and verified it, and what was reported to me was slightly wrong. Only
> some of the field are empty, notably CERT_KEY and SIGNER.
>
> Signed push with an unknown key:
> ===
> remote: No signature found
> remote: Your push was not signed with a known key.
> remote: You MUST use git push --signed with a known key.
> remote: If you just updated your key, please wait 15 minutes for sync.
> remote: git-receive-pack variables:
> remote: GIT_PUSH_CERT='1c471177906014e65e2825ee71572bf749970c16'
> remote: GIT_PUSH_CERT_KEY=''
> remote: GIT_PUSH_CERT_NONCE='1454372558-35db7be4533958f14731'
> remote: GIT_PUSH_CERT_NONCE_SLOP=''
> remote: GIT_PUSH_CERT_NONCE_STATUS='OK'
> remote: GIT_PUSH_CERT_SIGNER=''
> remote: GIT_PUSH_CERT_STATUS='N'

OK, this matches my expectation, and my earlier response to you is consistent with the above output, so there isn't much to add to the discussion from me. I was primarily worried about GIT_PUSH_CERT not being passed, but that does not seem to be the case, which is good. We still give GIT_PUSH_CERT, which makes it possible to write a validation hook that lazily fetches unknown keys as needed to implement its own more advanced checks, while allowing validation hooks that rely on a set of a-priori known keys to be written in a less error-prone way by saying "N" for "unknown" case.

Thanks.
Previous: Robin H. Johnson
Message 4 of 4 in “[RFC] GPG-Signed pushes & commits: differentiating between no signature and an unknown key”
  1. Robin H. JohnsonFeb 1, 2016
  2. Junio C HamanoFeb 1, 2016
  3. Robin H. JohnsonFeb 2, 2016
  4. Junio C HamanoFeb 2, 2016

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.