Open tomeon opened 3 years ago
Hmm, I see the issue. yubikey-agent is kind of designed with the idea of being used with a global graphical pinentry.
I would like the complexity of dealing with TTYs to be outside yubikey-agent. Here's an idea: add to contrib/
a command that when invoked with -update
updates the TTY, and when invoked otherwise runs the pinentry on that TTY. Then you can use that as the pinentry for yubikey-agent, which stays oblivious of how it all works.
I'm being hit with the same problem. @tomeon how are you able to specify which pinentry program that should be invoked. This worked for me for multiple days, but this morning I got the same error message.
Note, I'm trying to use a graphical pinentry backend, but it appears no to be working
Ran into this issue as well. Think the UX is suboptimal at the moment: there's no proper error message, and there's a need of maintaining gpg-agent conf even if you don't want to use gpg anymore.
age-plugin-yubikey
handles PIN inputs in TTY, and experience is inconsistent between the two.
Think it might be a good time to revisit this decision.
I recently ran into an issue attempting to use console-based
pinentry
clients (pinentry-tty
andpinentry-curses
) withyubikey-agent
. The details are in this issue comment in thegopasspw/gopass
repo; in brief, the problem is thatpinentry
doesn't know the correct TTY to use for obtaining the PIN, defaults to using something that's not a TTY (its own stdin, which is a pipe set up bygopasspw/pinentry
), and crashes:With
yubikey-agent
showing:Would you be willing to consider a PR introducing one or both of the following?:
yubikey-agent
process (e.g.,yubikey-agent -l /path/to/yubikey-agent.sock -enterpin
) so that it could be cached for later use when anssh
client process comes calling. This looks analogous to the approach taken byssh-agent
's PKCS#11 applet support, which the README characterizes as poor UX. However, this approach has the advantage of making it easy to answer the question of which TTYpinentry
should use: the TTY that ranyubikey-agent -enterpin
.gpg-agent
'sgpg-connect-agent updatestartuptty /bye
command, which informs the running agent that it should use the TTY specified in theGPG_TTY
environment variable as the TTY for forpinentry
interactions. This would facilitate using an equivalent of this neat trick for ensuring thatpinentry
always runs on the same TTY as the relevantssh
client process.Thanks!