This just started happening a couple of days ago on Fedora 28. I want GPG to remember my private key passphrase so I can decrypt files without entering the passphrase every time.
If I run gpg2 to decrypt a file after a reboot, I get a passphrase prompt. My laptop is encrypted by LUKS so I do not mind passphrases being cached indefinitely.
Checking settings shows it is set to cache:
$ gpgconf --list-options gpg-agent |grep cache default-cache-ttl:24:0:expire cached PINs after N seconds:3:3:N:600::34560000 default-cache-ttl-ssh:24:1:expire SSH keys after N seconds:3:3:N:1800:: max-cache-ttl:24:2:set maximum PIN cache lifetime to N seconds:3:3:N:7200::34560000 max-cache-ttl-ssh:24:2:set maximum SSH key lifetime to N seconds:3:3:N:7200:: ignore-cache-for-signing:8:0:do not use the PIN cache when signing:0:0:::: no-allow-external-cache:8:0:disallow the use of an external password cache:0:0:::: The output of
echo "KEYINFO --no-ask <id> Err Pmt Des" | gpg-connect-agent (from https://unix.stackexchange.com/a/286218/67045) shows it isn't cached before I put the passphrase in, and is after, however, if I then reboot it is shown as not cached again.
I also looked at this question but seems to be a different issue: GPG Password Caching is Not Working After Two Hours
This worked flawlessly previously and haven't made any changes apart from updating Skype.
gpg --edit-keythenpasswdto remove the passphrase.