From 4d0d9a8dfd557ac88f50bd73c786c7216bb01395 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Fri, 7 Nov 2025 21:34:05 +0100 Subject: Fix gpg forwarding on .local machines --- .bash_profile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.bash_profile') diff --git a/.bash_profile b/.bash_profile index ef9f275..3e575aa 100644 --- a/.bash_profile +++ b/.bash_profile @@ -18,6 +18,7 @@ fi export CLICOLOR=1 # Mac OS custorm colors (not LS_COLORS as unix) defaultscheme "exfxcxdxbxegedabagacad" export LSCOLORS=gxfxcxdxbxegedabagacad +export BASH_SILENCE_DEPRECATION_WARNING=1 # Silence new macOS warning about bash # Unix/Bash Readline custom colors (created by dircolors in bashrc) export LS_COLORS="$LS_COLORS:di=00;36:ln=00;35:ex=00;31" @@ -36,9 +37,11 @@ export LANG=en_US.UTF-8 GPG_TTY=$(tty) export GPG_TTY unset SSH_AGENT_PID -SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -export SSH_AUTH_SOCK -export BASH_SILENCE_DEPRECATION_WARNING=1 # Silence new macOS warning about bash +# If SSH_AUTH_SOCK is empty, then set it, otherwise it's already set by ForwardAgent +if [ -z "$SSH_AUTH_SOCK" ]; then + SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + export SSH_AUTH_SOCK +fi # ==== Shell Opts shopt -s checkwinsize # check the window size after each command and, if necessary, update LINES/COLUMNS -- cgit v1.2.3