<div dir="ltr"><div><div><div>Hello,<br><br></div>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 (<a href="https://github.com/romanz/trezor-agent/blob/master/doc/README-GPG.md">https://github.com/romanz/trezor-agent/blob/master/doc/README-GPG.md</a>) and I am receiving the error "gpg: decryption failed: No secret key" when I try to decrypt the files.<br><br></div>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.<br><br>% 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<br>gpg: decryption failed: No secret key<br>% env GPG_TTY="tty" gpg2 -d --quiet --yes --compress-algo=none --no-encrypt-to --batch --use-agent /home/igor/.password-store/testpass.gpg<br>Te5tPA55<br>% echo "" | pass testpass<br>gpg: decryption failed: No secret key<br>% pass testpass<br>Te5tPA55<br><br></div>Where do you think is the proper way to fix the issue?<br><br><div><br></div></div>