gnupg: No secret key (gpg-agent / pinentry interaction issue)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pinentry (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
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:/
Status changed to 'Confirmed' because the bug affects multiple users.