Penguin, small TECH.BARWICK.DE

Recent posts





Powered By


Friday, January 24, 2020   6:07 AM

Making GPG pinentry work over SSH

When logged into a server via SSH, usually any attempt to decrypt a file with GPG results in an unhelpful error message like:

gpg: cancelled by user
... gpg: decryption failed: No secret key

with no attempt made to ask for a password.

Fix for this is simply to execute: export GPG_TTY=`tty`,

Note that if pinentry-program in ~/.gnupg/gpg-agent.conf is set to /usr/bin/pinentry-gtk, and this is an alias for /usr/bin/pinentry-gtk-2, set pinentry-program to the latter (/usr/bin/pinentry-gtk-2), which appears to change the behaviour (pinentry-gtk-2 should be able to automatically detect whether to execute in GUI or text mode, whereas the original pinentry-gtk is GUI-only.

See also "Forcing GPG passphrase input in the terminal".

Posted in Linux | add a comment

My email client suddenly became unable to log in to my Gmail account with the error message:

Please log in via your web browser: (Failure)

However I was logged in via my web browser on two different devices, and even when providing the email client with definitively the correct password, the above error recurred.

The provided link wasn't very helpful.

Posted in email | add a comment