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 24, 2021, 20:35 UTC
Message-ID
<xmqqsfwq40w7.fsf@gitster.g>
In-Reply-To
<20211024193625.148-1-mbeck@eaddrinuse.net>
Marco Beck <mbeck@eaddrinuse.net> writes:
> This allows selecting the gpg(1) key id to use for signing by setting the
> environment variable GIT_GPG_SIGNINGKEY.

Can you explain why we want to add another way to specify the key? It appears to me that user.signingkey is an adequate "set it once, forget it, and keep using it" way to do so. "I cannot write to the config file" is unlikely, as the user must be capable of writing into the repository to sign in the first place.

Is the driving motivation "I want to sign under a different identity from the one the repository specifies in its local configuration"? Wouldn't that be covered with a single-shot configuration syntax:

    $ git -c user.signingkey=mbeck@eaddrinuse.net tag -s ...

Unless there is a good reason to (and these days there aren't that many), we prefer not to add new environment variables like this.

Thanks.
Previous: Marco BeckNext: Marco Beck
Message 2 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.