mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Don't clobber ssh-agent
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Custom agent to handle gpg-agent 2.1
|
# Custom plugin to handle gpg-agent 2.1
|
||||||
|
|
||||||
local GPG_ENV=$HOME/.gnupg/gpg-agent.env
|
local GPG_ENV=$HOME/.gnupg/gpg-agent.env
|
||||||
|
|
||||||
@@ -18,11 +18,12 @@ function start_agent_withssh {
|
|||||||
|
|
||||||
if [ -z "${GPG_AGENT_INFO}" ] ; then
|
if [ -z "${GPG_AGENT_INFO}" ] ; then
|
||||||
if which gpgconf >/dev/null 2>&1 ; then
|
if which gpgconf >/dev/null 2>&1 ; then
|
||||||
# This might clobber SSH_AUTH_SOCK anyway...
|
|
||||||
GPG_AGENT_INFO=$(gpgconf --list-dirs agent-socket)
|
GPG_AGENT_INFO=$(gpgconf --list-dirs agent-socket)
|
||||||
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
||||||
export GPG_AGENT_INFO
|
export GPG_AGENT_INFO
|
||||||
export SSH_AUTH_SOCK
|
if [ -z "${SSH_AUTH_SOCK}" ] ; then
|
||||||
|
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user