diff options
Diffstat (limited to 'gpg-reset-pinentry')
-rwxr-xr-x | gpg-reset-pinentry | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gpg-reset-pinentry b/gpg-reset-pinentry new file mode 100755 index 0000000..4065d61 --- /dev/null +++ b/gpg-reset-pinentry @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# If I can't use gpg-agent for ssh, then it could be because the pinentry tty is +# locked. This can also happen if I try to sign a commit in emacs, and the +# pinentry minibuffer get eaten by the interface. In both cases, pinentry is +# pending, so I can't unlock the card, but I lost the pinentry and can't enter +# my pin, so I'm totally stuck. Took me forever to figure this out but thanks to +# SultanLegend on StackOverflow I figured it out. +# +# > I had the error when using gpg-agent as my ssh-agent and using a gpg subkey +# > as my ssh key https://wiki.archlinux.org/index.php/GnuPG#gpg-agent. I +# > suspect that the problem was caused by having an invalid pin entry tty for +# > gpg caused by my sleep+lock command used in my sway config +# +# source: https://stackoverflow.com/a/57116258 +gpg-connect-agent updatestartuptty /bye > /dev/null |