diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-07-04 16:29:18 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-07-04 16:29:18 -0500 |
commit | d4353d726755f28d0405fbb34499bdcc60adf3a6 (patch) | |
tree | 9e73c0fddf1e8cc9c03c59ed817f6bead60e6341 /gnupg/.config/zsh/.zshrc.d | |
parent | 45c9278c78c955b7b5b6cdd8c830320efd28392c (diff) |
gnupg: dynamic pinentry
Diffstat (limited to 'gnupg/.config/zsh/.zshrc.d')
-rw-r--r-- | gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh b/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh index 532697e..0b3c422 100644 --- a/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh +++ b/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh @@ -1,9 +1,9 @@ #!/bin/zsh # vim:ft=sh -GPG_TTY=$(tty) -export GPG_TTY +if [ -t 0 ] && [ -z "$SSH_TTY" ]; then + export GPG_TTY="$(tty)" + export PINENTRY_USER_DATA=USE_TTY=1 +fi gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1 - -alias unlock='echo "" | gpg --clearsign 1>/dev/null && ssh localhost -- : 1>/dev/null' |