summaryrefslogtreecommitdiff
path: root/dots
diff options
context:
space:
mode:
Diffstat (limited to 'dots')
-rwxr-xr-xdots/zsh/.config/zsh/setup/gpg.zsh.j217
1 files changed, 8 insertions, 9 deletions
diff --git a/dots/zsh/.config/zsh/setup/gpg.zsh.j2 b/dots/zsh/.config/zsh/setup/gpg.zsh.j2
index ea5a418..f4c36cb 100755
--- a/dots/zsh/.config/zsh/setup/gpg.zsh.j2
+++ b/dots/zsh/.config/zsh/setup/gpg.zsh.j2
@@ -7,14 +7,13 @@ gpg -k "$KEY_ID" >/dev/null 2>&1 || gpg --import "$HOME/.pubkey"
export PINENTRY_USER_DATA="${PINENTRY_USER_DATA:-PINENTRY_USE_TTY}"
if [ "$SSH_CLIENT" ]; then
export PINENTRY_USER_DATA=PINENTRY_USE_CURSES
- exit 0
+else
+ # yubikey ssh, gpg, and the works!
+ # https://github.com/drduh/YubiKey-Guide
+ unset SSH_AGENT_PID
+ export GPG_TTY=$(tty)
+ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
+ gpgconf --launch gpg-agent
+ gpg-connect-agent updatestartuptty /bye > /dev/null
fi
-
-# yubikey ssh, gpg, and the works!
-# https://github.com/drduh/YubiKey-Guide
-unset SSH_AGENT_PID
-export GPG_TTY=$(tty)
-export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
-gpgconf --launch gpg-agent
-gpg-connect-agent updatestartuptty /bye > /dev/null
# -- </gpg> --