Only initialize gpg-agent if it's not an SSH connection or a toolbox

This commit is contained in:
Sam A. 2023-03-13 13:31:42 +01:00
parent 42f1b4c84b
commit 6936cab5c2
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,4 +1,6 @@
export GPG_TTY="$TTY" if [[ -z $SSH_CONNECTION ]] && [[ $HOSTNAME != "toolbox" ]]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" export GPG_TTY="$TTY"
gpgconf --launch gpg-agent export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
gpg-connect-agent updatestartuptty /bye &> /dev/null gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye &> /dev/null
fi