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.