ssh with gpg-agent

This commit is contained in:
vonProteus 2024-04-27 10:59:53 +02:00
parent 89598d72d5
commit 4fd4765af4
Signed by untrusted user who does not match committer: vonProteus
GPG Key ID: 65472F126055FF23

17
zsh.d/50_gpg-agent.zsh Normal file
View File

@ -0,0 +1,17 @@
# vim: ft=zsh
if command-exists "gpg-agent"; then
# on OS X with GPGTools, comment out the next line:
if [[ "$OSTYPE" != "darwin"* ]]; then
# non OSX
eval $(gpg-agent --daemon)
fi
GPG_TTY=$(tty)
export GPG_TTY
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
fi
fi