blob: 4065d61fe8ef4285a4d523fd693511f53c466f01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|