diff options
-rw-r--r-- | dotfiles/.bash_profile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dotfiles/.bash_profile b/dotfiles/.bash_profile index 9334ce0..ff1ce98 100644 --- a/dotfiles/.bash_profile +++ b/dotfiles/.bash_profile @@ -16,8 +16,12 @@ if [ -f ~/.bashrc ]; then . ~/.bashrc; fi # Search for binaries in user profile /sbin. export PATH="$HOME/.guix-profile/sbin:$PATH" -# SSH agent. -export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh" +# Only configure the SSH agent if we're not in an SSH session with a +# forwarded agent. +if ! [ -n "$SSH_CLIENT" -a -n "$SSH_AUTH_SOCK" ] +then + export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh" +fi # Ruby. export GEM_PATH="$HOME/.guix-profile/lib/ruby/gems/2.2.0" |