Skip to content

Commit

Permalink
Use /run/user for gpg socket directory
Browse files Browse the repository at this point in the history
  • Loading branch information
eliihen committed Sep 21, 2016
1 parent 0fcc86b commit 8bf6618
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .zshrc
Expand Up @@ -164,12 +164,8 @@ export MODE_INDICATOR="%{$fg_bold[white]%}%{$bg[yellow]%} NORMAL %{$reset_color%
export GPG_KEY=0E25CFCC
export GPG_TTY=$(tty)

# Fedora places the gpg-agent ssh socket in a weird place
if [ -f /etc/redhat-release ]; then
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
else
export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh"
fi
# gpg 2.1 or something changed the socket location
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"

# ssh does not auto-launch gpg-agent, we do it manually
gpgconf --launch gpg-agent
Expand Down

0 comments on commit 8bf6618

Please sign in to comment.