Eval ssh-agent directly
This commit is contained in:
10
zsh/zprofile
10
zsh/zprofile
@@ -39,14 +39,8 @@ if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then
|
|||||||
eval $(gpg-agent --daemon --sh)
|
eval $(gpg-agent --daemon --sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set SSH to use gpg-agent
|
# because gpg-agent is somehow broken for ssh, use the usual ssh-agent
|
||||||
unset SSH_AGENT_PID
|
eval $(ssh-agent -s)
|
||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
||||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set GPG TTY
|
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
|
|
||||||
# exec startx breaks some logind fuckery, without exec it works
|
# exec startx breaks some logind fuckery, without exec it works
|
||||||
if [[ -z $DISPLAY ]] ; then
|
if [[ -z $DISPLAY ]] ; then
|
||||||
|
|||||||
Reference in New Issue
Block a user