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

Re: Calling "gpg --sign" with loopback pinentry in some scenarios, but not always

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 17, 2024, 23:31 UTC
Message-ID
<xmqqle7ifz2i.fsf@gitster.g>
In-Reply-To
<de38341b-f69f-4d3b-a4c2-4443e1ec1f6f@vodafonemail.de>
Jens Schmidt <farblos@vodafonemail.de> writes:
Show 5 quoted lines
> It seems that "git" does not have any hooks to pass arbitrary
> additional parameters to "gpg", right?  So my only reasonable
> option would be a Emacs/Magit-specific "gpg"-wrapper that adds
> command line parameter "--pinentry-mode loopback" to the wrapped
> "gpg" executable.

Correct. You can point your gpg.program configuration variable at your wrapper, perhaps

    $ cat >"$HOME/bin/mygpg-with-pinentry" <<\EOF
    #!/bin/sh
    exec gpg --pinentry-mode loopback "$@"
    EOF
    $ chmod +x "$HOME/bin/mygpg-with-pinentry"
    $ git config gpg.openpgp.program "$HOME/bin/mygpg-with-pinentry"
or something like that.  It is unfortunate that
    $ git config gpg.openpgp.program "gpg --pinentry-mode loopback"
does not work.
Previous: Jens Schmidt
Message 2 of 2 in “Calling "gpg --sign" with loopback pinentry in some scenarios, but not always”
  1. Jens SchmidtFeb 17, 2024
  2. Junio C HamanoFeb 17, 2024

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.