Age-plugin-yubikey: Error: (stanza 0 0) Failed to decrypt YubiKey stanza

Hello guys! I’m trying to get ryantm/agenix working with the str4d/age-plugin-yubikey plugin. For the time being I’d like to try the plugin out first, before integrating it into my config but it gives me the following error message, if I try to decrypt an encrypted file:

Waiting for <U+2068>age-plugin-yubikey<U+2069>...
Error: (stanza 0 0) Failed to decrypt YubiKey stanza

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report                            ]

Reproduction steps

  1. Install rage and age-plugin-yubikey on your system.
  2. Create a temporary directory to try the example: mkdir -p /tmp/yubi-test && cd /tmp/yubi-test
  3. Execute age-plugin-yubikey --generate > yubikey-identity.txt
  4. Execute the following:
echo "success!" > test.txt
# encrypt the file
cat test.txt | rage -r <your recipient id> > test.age
cat test.age | rage -d -i yubikey-identity.txt

Now the error should pop up after the decryption command. Do you have an idea how to fix this?

Other links

I created an issue for this but the maintainer hasn’t responeded yet:

1 Like

Damn, I finally found the solution for it: I needed to press on my my yubikey to make age-plugin-yubikey working!