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

Re: git-tag -s can't find GPG private key

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2010, 21:16 UTC
Message-ID
<7v3a1rp7ta.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4B60A9F0.5000904@gmail.com>
"Mike.lifeguard" <mike.lifeguard@gmail.com> writes:
> It seems that when the GPG key name and user.name in git's config are
> different, git can't find the appropriate private key to sign the tag.
> Git should attempt to use user.email to find the key. Setting
> user.signingkey is of course a workaround.

user.signingkey was devised for this exact case, and I don't think it is a work-around.

I do not think "should attempt" is a correct attitude, even though I can 100% agree with "it would have been nicer if it attempted to do this from day one". You are unfortunately not interacting with git codebase in early 2005 anymore and there are thousands if not millions of existing users you should worry about.

Using user.email changes the behaviour for people who do not want a key that has the same e-mail address, and because the choice of key is all about security, the logic to choose which one shouldn't be changed lightly.

Previous: Sverre Rabbelier
Message 3 of 3 in “git-tag -s can't find GPG private key”
  1. Mike.lifeguardJan 27, 2010
  2. Sverre RabbelierJan 27, 2010
  3. Junio C HamanoJan 27, 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.