diff --git a/bash/gnupg.sh b/bash/gnupg.sh index 3d259ef..ab29be1 100644 --- a/bash/gnupg.sh +++ b/bash/gnupg.sh @@ -1,5 +1,7 @@ -export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -gpg-connect-agent updatestartuptty /bye > /dev/null +if [ ${EUID} -ne 0 ] ; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + gpg-connect-agent updatestartuptty /bye > /dev/null +fi alias gpgoff='gpgconf --kill gpg-agent'