From b3aae205ac5a470f0ddd33b1c9e80821e76c09e2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 26 Feb 2022 00:11:46 +0300 Subject: .bashrc: export GPG_TTY --- %HOME%/.bashrc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '%HOME%') diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 3b350f3..94dd1f3 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -61,6 +61,16 @@ alias coredumpctl='coredumpctl --debugger-arguments="-q"' # Group by 1 byte only with xxd: alias xxd='xxd -groupsize 1' +# This doc says that "you should always add the following lines to your +# .bashrc": +# +# https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html +# +# Otherwise, GPG signing in git often doesn't work (for example, ever a SSH +# connection): https://stackoverflow.com/a/54809060/514684 +GPG_TTY="$( tty )" +export GPG_TTY + [ -r "$HOME/.bash_utils/file.sh" ] && source "$HOME/.bash_utils/file.sh" [ -r "$HOME/.bash_utils/text.sh" ] && source "$HOME/.bash_utils/text.sh" -- cgit v1.2.3