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

Re: [PATCH] gpg-interface: allow selecting key id with env variable

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 25, 2021, 10:38 UTC
Message-ID
<xmqqwnm12xv7.fsf@gitster.g>
In-Reply-To
<YXXMroOBvDERXIMP@octopus.int.carobme.de>
Marco Beck <mbeck@eaddrinuse.net> writes:
Show 11 quoted lines
> On Sun, Oct 24, 2021 at 01:35:04PM -0700, Junio C Hamano wrote:
>
>>Can you explain why we want to add another way to specify the key?
>
> Motivation for that patch was that I usually use the same .gitconfig
> (all dotfiles actually) with multiple identities (e.g. company and private
> email address). It's really convenient to switch to a different identity
> for the rest of the session by just setting e.g. $GIT_AUTHOR_EMAIL and not
> needing to remember adding --author to every invocation of git-commit(1)
> etc. Thought it would be nice to have that convenience for selecting a
> signing key as well.

If you are flipping between two (or more) idents using GIT_AUTHOR_* but not doing the same for GIT_COMMITTER_*, then your commits may be made under the same committer identity for both work and hobby projects, which may not be what you want. And if you are flipping between multiple committer idents via GIT_COMMITTER_* environment variables, the GPG signing key should follow the committer ident at no extra cost, I would think.

Previous: Marco Beck
Message 9 of 9 in “gpg-interface: allow selecting key id with env variable”
  1. gpg-interface: allow selecting key id with env variableMarco Beck, Oct 24, 2021
  2. Junio C HamanoOct 24, 2021
  3. Marco BeckOct 24, 2021
  4. Fabian StelzerOct 25, 2021
  5. Marco BeckOct 25, 2021
  6. Fabian StelzerOct 25, 2021
  7. Ævar Arnfjörð BjarmasonOct 25, 2021
  8. Marco BeckNov 7, 2021
  9. Junio C HamanoOct 25, 2021

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.