A few days ago I reinstalled my box, keeping my previous /home
partition intact.
Afterwards, I’ve been unable to use gpg
“normally”: I use Emacs and have configured git
to sign every commit. Trying to commit from emacs (with magit) results in:
error: gpg failed to sign the data
fatal: failed to write commit object
In the console I get the error:
$ git commit -m 'Add AsyncButton'
error: gpg failed to sign the data
fatal: failed to write commit object
but that can be worked around by setting GPG_TTY
to the result of tty
; but that only solves the console issue, not the Emacs issue.
Journal of gpg-agent and gnome-keyring-daemon is:
$ journalctl --since=today /usr/bin/gnome-keyring-daemon
-- Journal begins at Sat 2021-07-31 17:30:33 CEST, ends at Wed 2021-08-04 10:10:57 CEST. --
-- No entries --
$ journalctl --since=today /usr/bin/gpg-agent
....
Aug 04 10:09:18 pavla gpg-agent[487692]: failed to unprotect the secret key: Inappropriate ioctl for device
Aug 04 10:09:18 pavla gpg-agent[487692]: failed to read the secret key
Aug 04 10:09:18 pavla gpg-agent[487692]: command 'PKSIGN' failed: Inappropriate ioctl for device <Pinentry>
Do you have any ideas?