Estou tendo problemas para obter gpg (na verdade pass que usa gpg no plano de fundo) para trabalhar dentro de tmux e um Yubikey Neo. Ao tentar descriptografar um arquivo ou assinar algo usando gpg , recebo o seguinte:
$ gpg -d test.gpg
gpg: sending command 'SCD PKDECRYPT' to agent failed: ec=5.99
gpg: public key decryption failed: general error
gpg: decryption failed: secret key not available
Isso é somente dentro de tmux , se eu tentar executar o mesmo comando em uma sessão zsh normal diretamente em gnome-terminal , isso simplesmente funciona:
gpg -d test.gpg
helloworld
pinentry irá aparecer, peça-me o PIN para desbloquear o Yubikey e continue a descriptografar o arquivo.
Acho que reduzi o problema para pinentry não ser capaz de gerar. Definindo o nível de log do gpg-agent , recebo o seguinte:
gpg-agent[906]: DBG: chan_6 <- INQUIRE NEEDPIN ||Please enter the PIN
gpg-agent[906]: starting a new PIN Entry
gpg-agent[906]: DBG: chan_7 <- OK Pleased to meet you, process 906
gpg-agent[906]: DBG: connection to PIN entry established
... options removed ...
gpg-agent[906]: DBG: chan_7 -> GETINFO pid
gpg-agent[906]: DBG: chan_7 <- D 13381
gpg-agent[906]: DBG: chan_7 <- OK
gpg-agent[906]: DBG: chan_7 -> SETKEYINFO --clear
gpg-agent[906]: DBG: chan_7 <- OK
gpg-agent[906]: DBG: chan_7 -> SETDESC Please enter the PIN
gpg-agent[906]: DBG: chan_7 <- OK
gpg-agent[906]: DBG: chan_7 -> SETPROMPT PIN
gpg-agent[906]: DBG: chan_7 <- OK
gpg-agent[906]: DBG: chan_7 -> [[Confidential data not shown]]
gpg-agent[906]: DBG: chan_7 <- [[Confidential data not shown]]
gpg-agent[906]: DBG: error calling pinentry: Operation cancelled <Pinentry>
gpg-agent[906]: DBG: chan_7 -> BYE
gpg-agent[906]: DBG: chan_6 -> CAN
gpg-agent[906]: DBG: chan_6 <- ERR 100663573 IPC call has been cancelled <SCD>
gpg-agent[906]: DBG: chan_5 -> ERR 83886179 Operation cancelled <Pinentry>
Nada de suspeito aparece para mim, exceto algumas instruções OPTION que aparentemente não são manipuladas por pinentry , mas recebo o mesmo ao chamar gnome-terminal .
Configurar a variável $DISPLAY também não ajuda, o erro é idêntico.
Estou faltando alguma coisa? Existe alguma outra variável que preciso definir? E por que isso não volta para pinentry-ncurses se não conseguir abrir um gráfico?