Use GPG agent for SSH also

This commit is contained in:
2019-04-16 20:10:47 +02:00
parent 795dfc152d
commit f4641c4604
6 changed files with 3 additions and 18 deletions

View File

@@ -4,13 +4,7 @@ _zshdir="$HOME/.zshrc.d"
{% if machine.gpg_agent %}
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
{% endif %}
{% if machine.ssh_agent %}
if $(ssh-add -l 2>/dev/null | grep -q "no identities") ; then
ssh-add
fi
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
{% endif %}
for file in "${_zshdir}"/* ; do