mirror of https://github.com/nirenjan/dotfiles.git
Get SSH_AUTH_SOCK from gpgconf
Older versions of GPG don't support the `agent-ssh-socket` option, so we will have to work around this.master
parent
b5fc74d501
commit
9da5e26220
|
@ -1,3 +1,10 @@
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
|
|
||||||
export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh"
|
export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh"
|
||||||
|
|
||||||
|
TSOCK=$(gpgconf --list-dirs agent-ssh-socket || true)
|
||||||
|
if [[ -n "$TSOCK" ]]
|
||||||
|
then
|
||||||
|
export SSH_AUTH_SOCK="$TSOCK"
|
||||||
|
unset TSOCK
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue