Mailing List Archive

pinentry doesn't work with Emacs anymore
Hi!
A short while ago, pinentry-gtk2 was removed from
app-crypt/pinentry. Around the same time, app-crypt/gnupg was
updated. Since then, I can not use the gpg-agent from whithin Emacs
(--deamon) anymore. When I commit something with Magit, I get no
password dialog but this error message instead:

error: gpg failed to sign the data

After I add the key to the agent in another way (with `echo "test" | gpg
--clearsign` for example), it works in Emacs again. So it seems that
there is something wrong with my pinentry setup.

I tried pinentry-gnome3 and pinentry-qt5, it makes no
difference. GPG_AGENT_INFO is known to Emacs.

This is my ~/.gnupg/gpg-agent.conf:

default-cache-ttl 43200
max-cache-ttl 86400
default-cache-ttl-ssh 21600
max-cache-ttl-ssh 86400
pinentry-program /usr/bin/pinentry

Does anybody know what the problem might be?

Kind regards, tastytea

--
Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at
<https://tastytea.de/tastytea.asc>.
Re: pinentry doesn't work with Emacs anymore [ In reply to ]
On Saturday, 20 February 2021 15:22:45 GMT tastytea wrote:
> Hi!
> A short while ago, pinentry-gtk2 was removed from
> app-crypt/pinentry. Around the same time, app-crypt/gnupg was
> updated. Since then, I can not use the gpg-agent from whithin Emacs
> (--deamon) anymore. When I commit something with Magit, I get no
> password dialog but this error message instead:
>
> error: gpg failed to sign the data
>
> After I add the key to the agent in another way (with `echo "test" | gpg
> --clearsign` for example), it works in Emacs again. So it seems that
> there is something wrong with my pinentry setup.
>
> I tried pinentry-gnome3 and pinentry-qt5, it makes no
> difference. GPG_AGENT_INFO is known to Emacs.
>
> This is my ~/.gnupg/gpg-agent.conf:
>
> default-cache-ttl 43200
> max-cache-ttl 86400
> default-cache-ttl-ssh 21600
> max-cache-ttl-ssh 86400
> pinentry-program /usr/bin/pinentry

I have the same entry in my gpg-agent.conf and it works fine, but I do not use
emacs.


> Does anybody know what the problem might be?
>
> Kind regards, tastytea

My /usr/bin/pinentry is linked to pinentry-qt:

$ ls -la /usr/bin/pinentry
lrwxrwxrwx 1 root root 11 Jun 21 2019 /usr/bin/pinentry -> pinentry-qt

You could set this manually, or with eselect, or I think your desktop
environment will set it for you.
Re: pinentry doesn't work with Emacs anymore [ In reply to ]
On 2021-02-20 15:52+0000 Michael <confabulate@kintzios.com> wrote:

> On Saturday, 20 February 2021 15:22:45 GMT tastytea wrote:
> > Hi!
> > A short while ago, pinentry-gtk2 was removed from
> > app-crypt/pinentry. Around the same time, app-crypt/gnupg was
> > updated. Since then, I can not use the gpg-agent from whithin Emacs
> > (--deamon) anymore. When I commit something with Magit, I get no
> > password dialog but this error message instead:
> >
> > error: gpg failed to sign the data
> >
> > After I add the key to the agent in another way (with `echo "test"
> > | gpg --clearsign` for example), it works in Emacs again. So it
> > seems that there is something wrong with my pinentry setup.
> >
> > I tried pinentry-gnome3 and pinentry-qt5, it makes no
> > difference. GPG_AGENT_INFO is known to Emacs.
> >
> > This is my ~/.gnupg/gpg-agent.conf:
> >
> > default-cache-ttl 43200
> > max-cache-ttl 86400
> > default-cache-ttl-ssh 21600
> > max-cache-ttl-ssh 86400
> > pinentry-program /usr/bin/pinentry
>
> I have the same entry in my gpg-agent.conf and it works fine, but I
> do not use emacs.
>
>
> > Does anybody know what the problem might be?
> >
> > Kind regards, tastytea
>
> My /usr/bin/pinentry is linked to pinentry-qt:
>
> $ ls -la /usr/bin/pinentry
> lrwxrwxrwx 1 root root 11 Jun 21 2019 /usr/bin/pinentry ->
> pinentry-qt
>
> You could set this manually, or with eselect, or I think your desktop
> environment will set it for you.

I did set it with eselect. pinentry works fine when I use gpg in the
terminal. It seems to be a problem with gpg inside Emacs.

--
Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at
<https://tastytea.de/tastytea.asc>.