diff --git a/zsh/.config/zsh/gpg.zsh b/zsh/.config/zsh/gpg.zsh index f291f3e..912c435 100644 --- a/zsh/.config/zsh/gpg.zsh +++ b/zsh/.config/zsh/gpg.zsh @@ -1,4 +1,6 @@ -export GPG_TTY="$TTY" -export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -gpgconf --launch gpg-agent -gpg-connect-agent updatestartuptty /bye &> /dev/null +if [[ -z $SSH_CONNECTION ]] && [[ $HOSTNAME != "toolbox" ]]; then + export GPG_TTY="$TTY" + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + gpgconf --launch gpg-agent + gpg-connect-agent updatestartuptty /bye &> /dev/null +fi