Package: gpg Version: 2.2.2-1 Severity: important Hello Debian GnuPG Maintainers!
I have the following pinentry packages installed: $ aptitude search pinentry | grep ^i i A pinentry-gtk2 - GTK+-2-based PIN or pass-phrase entry dialog for GnuPG i pinentry-tty - minimal dumb-terminal PIN or pass-phrase entry for GnuPG Hence, I expect gpg to work in text consoles (without X), as well as in X sessions. Well, I have no problems, when in an X session (pinentry-gtk2 asks for the passphrase and gpg is able to sign and/or decrypt data). On the other hand, I cannot use gpg in the text console, after exiting from an X session. Steps to reproduce the bug: 0) login on a text console (textual login on getty, I mean) 1) start an X session $ startx 2) use the X session a bit and then quit from it 3) back to the text console (the one where you logged in); try to sign a file $ gpg --sign foo gpg: using "XXXXXXXXXXXXXXXX" as default secret key for signing gpg: signing failed: Permission denied gpg: signing failed: Permission denied gpg exited with the above error and no foo.gpg was generated $ ls foo 4) exit from the text console $ exit 5) login again on the text console 6) try again (without starting an X session) $ gpg --sign foo pinentry-tty correctly asks for the passphrase and everything works as intended 7) file foo.gpg has been generated $ ls foo foo.gpg What's wrong? What did I fail to understand? Please let me know. Thanks for your time! -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (800, 'testing'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gpg depends on: ii gpgconf 2.2.2-1 ii libassuan0 2.4.3-3 ii libbz2-1.0 1.0.6-8.1 ii libc6 2.24-17 ii libgcrypt20 1.7.9-2 ii libgpg-error0 1.27-5 ii libreadline7 7.0-3 ii libsqlite3-0 3.21.0-1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages gpg recommends: ii gnupg 2.2.2-1 gpg suggests no packages. -- no debconf information