Hello,

recently I faced with a the issue, I found wht is the problem but it's not
completly clear where it should be fixed, I am using passff + pass + trezor
gpg agent (
https://github.com/romanz/trezor-agent/blob/master/doc/README-GPG.md) and I
am receiving the error "gpg: decryption failed: No secret key" when I try
to decrypt the files.

It appeared that passff uses stdin to communicate with the host application
which starts pass. Because of ths line `export GPG_TTY="${GPG_TTY:-$(tty
2>/dev/null)}"` and empty variable GPG_TTY, GPG_TTY becomes "not a tty",
and for that reason gpg cannot communicate with the agent.

% env GPG_TTY="not a tty" gpg2 -d --quiet --yes --compress-algo=none
--no-encrypt-to --batch --use-agent /home/igor/.password-store/testpass.gpg
gpg: decryption failed: No secret key
% env GPG_TTY="tty" gpg2 -d --quiet --yes --compress-algo=none
--no-encrypt-to --batch --use-agent /home/igor/.password-store/testpass.gpg
Te5tPA55
% echo "" | pass testpass
gpg: decryption failed: No secret key
% pass testpass
Te5tPA55

Where do you think is the proper way to fix the issue?
_______________________________________________
Password-Store mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to