From 7bd9a5404198b63e3d6717aba4acedbe2bc5eb99 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 4 Jan 2024 14:48:10 +0100 Subject: [PATCH] [gpg] Set and export `GPG_TTY` from bashrc. --- .bashrc.dotfiles | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bashrc.dotfiles b/.bashrc.dotfiles index 633be1c..3373984 100644 --- a/.bashrc.dotfiles +++ b/.bashrc.dotfiles @@ -28,6 +28,10 @@ if [ -n "${TMUX}" ]; then PROMPT_COMMAND="_tmux_update_environment" fi +# gpg-agent: started on demand, but must set GPG_TTY +GPG_TTY=$(tty) +export GPG_TTY + # Start tmux by default if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then if grep "default: " <(tmux list-sessions 2> /dev/null) > /dev/null; then