summaryrefslogtreecommitdiff
path: root/dots
diff options
context:
space:
mode:
authorHunt <lizhunt@amazon.com>2025-06-12 10:48:02 -0700
committerHunt <lizhunt@amazon.com>2025-06-12 10:48:02 -0700
commit50149205a6c2fc83d413f7260650125fd60aa679 (patch)
treecbb944af9ee530cafd5093f50caa1415a0ff5d4c /dots
parentc2c25cc09465fc643dc37df540bb4a6ec6ea8bd5 (diff)
downloaddotfiles-50149205a6c2fc83d413f7260650125fd60aa679.tar.gz
dotfiles-50149205a6c2fc83d413f7260650125fd60aa679.zip
Fixes for gpg for ssh sessions
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> --