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

Re: PATCH: Less fragile lookup of gpg key

From
Junio C Hamano <gitster@pobox.com>
Date
May 1, 2010, 19:54 UTC
Message-ID
<7v7hnn4cun.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4BDC63FB.7060202@grant-olson.net>
Grant Olson <kgo@grant-olson.net> writes:
Show 17 quoted lines
> On 5/1/2010 1:18 PM, Junio C Hamano wrote:
>> A Large Angry SCM <gitzilla@gmail.com> writes:
>>>
>>> Why not fall back to just the email if the full lookup fails?
>> 
>> Thanks; I like that suggestion a lot better.  Grant's suggestion does not
>> make the lookup "less fragile", but actually makes it less reliable for
>> people with the same address with different spellings of name and want to
>> choose which one to use per project.
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> Unless I'm mis-understanding you, the does the opposite of that.  It
> finds your gpg key based on your git email, ignoring your git name, so
> that different spellings of the name between gpg and git become irrelevant.
If I have two keys like these:
    Junio C Hamano <gitster@pobox.com>
    Junio Hamano <gitster@pobox.com>

and I have the latter set in .git/config to use for the project I am working on, your patch picks one at random, making the process less reliable.

AFAIU, ALASCM's suggestion was to first try the current method (which reliably picks what I told git to use by specifying user.name), and only if that fails, i.e. if I do not have neither of the above two keys but only have a key named like e.g.

    Git Panda <gitster@pobox.com>

then use only the e-mail as you wanted to, but do so purely as a fallback.

Which I found quite reasonable.
Previous: Grant OlsonNext: Grant Olson
Message 5 of 13 in “PATCH: Less fragile lookup of gpg key”
  1. Grant OlsonMay 1, 2010
  2. A Large Angry SCMMay 1, 2010
  3. Junio C HamanoMay 1, 2010
  4. Grant OlsonMay 1, 2010
  5. Junio C HamanoMay 1, 2010
  6. Grant OlsonMay 2, 2010
  7. Greg A. WoodsMay 3, 2010
  8. Grant OlsonMay 3, 2010
  9. Theodore TsoMay 3, 2010
  10. Greg A. WoodsMay 3, 2010
  11. tytso@mit.eduMay 4, 2010
  12. Grant OlsonMay 4, 2010
  13. Andreas EricssonMay 4, 2010

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.