Public bug reported: Since migration from gnupg 1.x to 2.1.15, gpg cannot decrypt my files anymore:
$ gpg -d < foo.gpg gpg: encrypted with 4096-bit ELG key, ID XXXXXXXXX, created XXXX-XX-XX "XXX <xxx>" gpg: public key decryption failed: Operation cancelled gpg: decryption failed: No secret key Increasing the gpg-agent loglevel reveals the following (note that in the whole process I was never prompted for my passphrase): gpg-agent[11397] DBG: chan_5 -> INQUIRE PINENTRY_LAUNCHED 11477 gpg-agent[11397] DBG: chan_5 <- END gpg-agent[11397] DBG: chan_6 -> SETKEYINFO n/XXXXXXXXXXXXXXXXX gpg-agent[11397] DBG: chan_6 <- OK gpg-agent[11397] DBG: chan_6 -> SETDESC Please enter the passphrase to unlock the OpenPGP secret key: ...... gpg-agent[11397] DBG: chan_6 <- OK gpg-agent[11397] DBG: chan_6 -> SETPROMPT Passphrase: gpg-agent[11397] DBG: chan_6 <- OK gpg-agent[11397] DBG: chan_6 -> [[Confidential data not shown]] gpg-agent[11397] DBG: chan_6 <- [[Confidential data not shown]] gpg-agent[11397] DBG: error calling pinentry: Operation cancelled <Pinentry> gpg-agent[11397] DBG: chan_6 -> BYE gpg-agent[11397] failed to unprotect the secret key: Operation cancelled gpg-agent[11397] failed to read the secret key gpg-agent[11397] command 'PKDECRYPT' failed: Operation cancelled <Pinentry> gpg-agent[11397] DBG: chan_5 -> ERR 83886179 Operation cancelled <Pinentry> gpg-agent[11397] DBG: chan_5 <- [eof] This looks a lot like https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=839547 -- which has a fix in pinentry/0.9.7-6 but hasn't made it to Ubuntu 16.10 yet. ** Affects: pinentry (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1647364 Title: gnupg: No secret key (gpg-agent / pinentry interaction issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pinentry/+bug/1647364/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs