I have export GPG_TTY=$(tty); gpg-connect-agent updatestartuptty /bye; in my .profile so that GPG knows which tty to use when running pinentry.

The issue is that this causes pinentry to start on the most recently opened pty as opposed to what I want, which is the pty that cause pinentry to run.

What's the solution to this? I'm running gpg-agent as an ssh-agent too.

Related, occasionally when I start an action requiring pinentry, absolutely nothing happens - pinentry won't run on any pty, even the most recently opened one.



The agent is accepts connections on a local socket. When it accepts a connection, it can't find out, with which tty the requesting program is connected, of whether it is connected to a tty at all. So it has to choose an input source by other criteria.

In the case where you don't see anything happen, it probably has selected a tty that is already closed or otherwise unavailable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.