How to avoid Passphrase prompt

Dashamir Hoxha dashohoxha at gmail.com
Fri Feb 2 04:45:52 CET 2018


On Fri, Feb 2, 2018 at 12:42 AM, Smith, Cathy <Cathy.Smith at pnnl.gov> wrote:

> My experience is that gpg 2.2 seems to be more suited for the desktop
> environment than for a server environment or a remotely administered site.
> We've been using gpg 1.4 (yes I know it is old) in batch mode for many
> years in a Red Hat environment.  Our server environment has grown
> increasingly restricted.  The gpg 2.2 windows pop up prompt is a real
> pain.  Another group that I used to do work for, just quit using gpg
> because they could not find a way around the pop up prompt in remote, batch
> installations.
>

There is always a solution or workaround, but it is a pain even for experts
to find it out.
It was a pain for me too (although I am not an expert). And I would not
remember it
if it was not for this piece of script:
https://github.com/dashohoxha/egpg/blob/gnupg-2.1/tests/setup.sh#L63-L69

So, the solution is to edit $GNUPGHOME/gpg-agent.conf and to change
'pinentry-program'
Then restart gpg-agent. You can set it to '/usr/bin/pinentry-tty' like this:
https://github.com/dashohoxha/egpg/blob/gnupg-2.1/src/cmd/init.sh#L25
In Debian/Ubuntu you have to install the package 'pinentry-tty'.

I have tried these on gpg2.1, but it should be the same for gpg2.

Regards,
Dashamir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180202/1706de0e/attachment.html>


More information about the Gnupg-users mailing list