gpg is my ssh-agent now

This commit is contained in:
Daylin Morgan 2024-10-22 10:53:48 -05:00
parent d9c4e91e77
commit b19e02bc6c
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -2,3 +2,10 @@
export GPG_TTY="$TTY"
gpgconf --launch gpg-agent
# have gpg-agent be the ssh-agent
# idea taken from https://wiki.archlinux.org/title/GnuPG#SSH_agent
if [[ -z "${SSH_CONNECTION}" ]]; then
export SSH_AGENT_PID=""
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"
fi