FS#69013 - core/gnupg 2.2.25-1: Console password prompt breaks tmux
Attached to Project:
Arch Linux
Opened by Tassilo Horn (tsdh) - Thursday, 17 December 2020, 10:30 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 05 January 2021, 15:22 GMT
Opened by Tassilo Horn (tsdh) - Thursday, 17 December 2020, 10:30 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 05 January 2021, 15:22 GMT
|
Details
Description:
I'm ssh-ed to some remote machine running an up-to-date arch install. There, I do: $ tmux # fire up a new tmux session $ gpg --decrypt --for-your-eyes-only .authinfo.gpg # decrypt pgp encrypted file I get the password prompt shown in the attached screenshot. After typing some characters of the passwort (or even just waiting a bit), tmux exits with [server exited unexpectedly] and I'm back at the non-tmux shell prompt. When I type there, it'll sometimes come out as the char I've type or as *, i.e., the password thingy is still active. When hitting RET, the password dialog re-appears. Typing again causes the same behavior. When I hit RET followed by possibly "tmux a", I can get back into my tmux session where of course the gpg command has failed to read the password. The gpg command and password prompt works without issues when executing it at a tty directly, i.e., not inside tmux. This problem started occurring very recently, so it's probably caused by some package update. Additional info: * core/gnupg 2.2.25-1 * community/tmux 3.1_c-1 |
This task depends upon
Closed by Doug Newgard (Scimmia)
Tuesday, 05 January 2021, 15:22 GMT
Reason for closing: Not a bug
Additional comments about closing: Config issue
Tuesday, 05 January 2021, 15:22 GMT
Reason for closing: Not a bug
Additional comments about closing: Config issue
$ mv /usr/sbin/pinentry /usr/sbin/pinentry.bak
$ ln -s /usr/sbin/pinentry-tty /usr/sbin/pinentry
I've had the very same issue, i.e., being dropped out of my tmux session with keyboard input somehow still being intercepted. So it doesn't seem to be an issue with the pinentry implementation - both tty and curses exhibit that issue.
GPG_TTY=$(tty)
export GPG_TTY
So after ssh-ing, it was set to /dev/pts/0. My fish config ensures that ~/.profile isn't sourced more than once so that I don't get duplicates in PATH and friends. So when starting tmux, tty would return /dev/pts/1 but GPG_TTY was still /dev/pts/0.
I have no clue why it worked with bash (or when connecting with mosh instead of ssh), but now I re-set GPG_TTY to the current tty in my ~/.config/fish/config.fish and pinentry works again.