age-plugin-yubikey icon indicating copy to clipboard operation
age-plugin-yubikey copied to clipboard

Enable providing YubiKey PIN via environment variable

Open str4d opened this issue 5 years ago • 1 comments

In programmatic use cases, the GUI or TUI used by pinentry (or the fallback interactive prompt) won't work. Instead, if the environment variable AGE_YUBIKEY_PIN is set, we should just use that as the PIN and never prompt for one.

There is a potential issue here in that if we don't have sufficiently-clear error messages, a user with an accidentally-configured environment might block their PIN while trying to get their script to work. We should make sure that we both log the fact that an environment variable is being used, and include that in any PIN-related errors.

str4d avatar Apr 15 '21 12:04 str4d

Any news on this ?

phouphoune1 avatar Dec 05 '25 13:12 phouphoune1

I need this feature so I'm going to try to implement it and open a PR.

gaykitty avatar Dec 07 '25 03:12 gaykitty