Page MenuHome GnuPG

pinentry not saving/using saved GPG key password
Closed, InvalidPublic

Description

Since migrating to GnuPG 2.1 and gnome-keyring 3.18, I have lost the ability to
use password SAVED in the keyring.

The password prompt now appears every now and then. Even if I click "Save
password" checkbox in the pinentry prompt, I'll be asked for it again next time
when I log in.

This is a regression. Previously, I only had to type keyring password and it
would supply GnuPG with the PGP Key passphrase.

Details

Version
0.9.7

Event Timeline

krejzi set Version to 0.9.7.
krejzi added a subscriber: krejzi.

What distribution are you using? What pinentry program? Can you take a look
using seahorse to make sure that your password is saved. Once it is saved, it
shouldn't be removed.

This is Linux From Scratch, pinentry 0.9.7, pinentry -> pinentry-gtk-2, with
fallback to ncurses. No other pinentry program works.

This is KDE environment, Qt pinentry crashes. I can confirm that there's a
keyring password in the Login keyring, which is the only keyring I use.

Nonetheless, the password won't be asked again while the gpg-agent is running,
the password was entered at least once, and the "Remember password (or
whatever)" box was checked.

As soon as gpg-agent is terminated or a session restarted (which also terminates
gpg-agent), next time I try to use the pgp key, I get asked for its passphrase.

marcus added a subscriber: marcus.

I just tested this with Fedora 26, pinentry-gnome3 0.9.7 and Gnome Keyring 3.20.1. See below for a full trace. If this doesn't work for you, check that you have compiled pinentry with libsecret, and did not deactivate the feature in the gpg-agent.conf.

$ pinentry-gnome3 
OK Pleased to meet you
OPTION allow-external-password-cache
OK
SETKEYINFO test
OK
GETPIN
D 1234
OK
$ pkill gpg-agent
$ pinentry-gnome3 
OK Pleased to meet you
OPTION allow-external-password-cache
OK
SETKEYINFO test
OK
GETPIN
S PASSWORD_FROM_CACHE
D 1234
OK