From 9f07a3d02cb849c27e34a275b2edd1b6f14fe793 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 1 Nov 2017 13:12:57 +1300 Subject: Always set GPG_TTY regardless of GPG_AGENT_INFO GnuPG 2.1 no longer sets the GPG_AGENT_INFO variable, making this a poor choice of precondition for setting GPG_TTY: The manual page for gpg-agent(1) in GnuPG 2.1 says: >You should always add the following lines to your .bashrc or whatever >initialization file is used for all shell invocations: > > GPG_TTY=$(tty) > export GPG_TTY So we'll follow that literally, and just set it every time. --- keychain/shrc.d/keychain.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keychain/shrc.d/keychain.sh b/keychain/shrc.d/keychain.sh index 9a732384..1c0e780e 100644 --- a/keychain/shrc.d/keychain.sh +++ b/keychain/shrc.d/keychain.sh @@ -1,4 +1,3 @@ -# If GPG_AGENT_INFO is set, update GPG_TTY for clean use of pinentry(1) etc -[ -n "$GPG_AGENT_INFO" ] || return +# Update GPG_TTY for clean use of pinentry(1) etc GPG_TTY=$(command -p tty) || return export GPG_TTY -- cgit v1.2.3