Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support for smartcards/yubikey #22

Closed
Sohex opened this issue Mar 1, 2022 · 5 comments
Closed

Feature request: support for smartcards/yubikey #22

Sohex opened this issue Mar 1, 2022 · 5 comments
Labels
question Further information is requested

Comments

@Sohex
Copy link

Sohex commented Mar 1, 2022

I have gopass setup to use a gpg key that lives on my yubikey. This works fine with tessen as well, except for when I need to use a password to unlock it. Where gopass would normally prompt me with pinentry tessen doesn't generate any kind of prompt at all. This means I have to go enter the pin elsewhere to unlock the yubikey before I can use tessen. Ideally tessen would pop up with a pinentry window when it's necessary.

@ayushnix ayushnix added the bug Something isn't working label Mar 1, 2022
@ayushnix
Copy link
Owner

ayushnix commented Mar 1, 2022

Unfortunately, I don't have a yubikey to test and determine if this is something that tessen needs to fix.

Normally, if the gpg password isn't in gpg-agent, if you use tessen, the pinentry menu does come up and asks for your password. From what you've described, it looks like gopass uses a pinentry prompt to unlock the yubikey? Without a yubikey to test things myself, I don't think I'll be able to do anything about this.

If you can open a PR to fix this issue, I'd be happy to review it.

@ayushnix ayushnix added the help wanted Extra attention is needed label Mar 1, 2022
@krevedkokun
Copy link

it works for me

@so-rose
Copy link

so-rose commented Oct 21, 2022

@Sohex tessen invokes (go)pass, which in turn invokes gpg, which in turn calls gpg-agent which tries to open the smartcard for decrypting a password. If said smartcard is locked, gpg-agent will then use a sensible pinentry to get the smartcard's pin from the user.

If the only installed pinentry is text-based, then without a terminal, nothing happens.

The good news is, all you need to fix the issue a GUI pinentry. The easiest way is something like pinentry-gnome3, which you can also set in your gpg-agent.conf (https://wiki.archlinux.org/title/GnuPG#pinentry) to force its usage. Then, when gpg-agent asks for a pinentry, it'll start up pinentry-gnome3.

@ayushnix This is not a bug in tessen. I'm happily using it with a yubikey as we speak! I would suggest documenting the requirement of having a GUI pinentry and closing the issue.

@ayushnix
Copy link
Owner

@so-rose Thanks for confirming that hardware keys work as expected when using tessen.

@Sohex Are you still facing this issue? Are you using a GUI pinentry like pinentry-qt or pinentry-gnome3 in ~/.gnupg/gpg-agent.conf?

@ayushnix ayushnix added question Further information is requested and removed help wanted Extra attention is needed bug Something isn't working labels Oct 22, 2022
@Sohex
Copy link
Author

Sohex commented Dec 21, 2022

Apologies, this was an issue with my pinentry configuration, closing.

@Sohex Sohex closed this as completed Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants