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

Gpg recrypt emits error about missing pkcs7 key #317

Open
phutterman opened this issue Mar 11, 2021 · 2 comments
Open

Gpg recrypt emits error about missing pkcs7 key #317

phutterman opened this issue Mar 11, 2021 · 2 comments
Labels

Comments

@phutterman
Copy link

phutterman commented Mar 11, 2021

I'm able to decrypt, edit, and save files with encrypted values, but the recrypt command is consistently failing with an error about pkcs7 public key even when I'm specifying as completely as I can think to that I'm using gpg.

For example:

$ eyaml recrypt -n gpg  --gpg-gnupghome=/Users/nfutterman/.gnupg --gpg-always-trust --gpg-recipients-file=../puppet/hiera-eyaml-gpg.recipients file.yaml

Resolving dependencies...
[hiera-eyaml-core] No such file or directory @ rb_sysopen - ./keys/public_key.pkcs7.pem

Apologies if I'm doing something wrong here.

(And this is on ruby 2.6.6 on OS X with hiera-eyaml 3.2.1, hiera-eyaml-gpg 0.7.4, gpgme 2.0.20)

Edit: this looks like it's related to #301 (as that also looks like it's describing the same thing, recrypt trying to use pkcs7 instead of gpg, and it's failing in my case because I don't have pkcs7 keys configured/present)

@jess-belliveau
Copy link

jess-belliveau commented Mar 18, 2022

@phutterman , I'm actually hitting this now working with some ancient eyaml - did you find a fix/workaround in the end?

edit: I managed to get passed this by specifying gpg:

eyaml recrypt --encrypt-method=gpg --change-encryption=gpg hieradata/path/to/eyaml/file.eyaml

@heini
Copy link

heini commented Sep 25, 2022

Can confirm the workaround works. However, I don't want to change the encryption method. It is gpg and will stay gpg, so this option shouldn't be needed.

Please change questionto bug.

@bastelfreak bastelfreak added bug and removed question labels Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants