Set ssh auth socket to use gpg-agent

This commit is contained in:
Adam Goldsmith 2023-06-22 23:15:17 -04:00
parent 10ed0376f9
commit 30627b531b

View File

@ -36,3 +36,9 @@ if [[ ! -d "$TMPPREFIX" ]]
then
mkdir -p "$TMPPREFIX"
fi
# Set SSH auth socket
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi