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

Can decrypt without specifying key in command line but cannot re-encrypt #1212

Open
zstern opened this issue May 18, 2023 · 0 comments
Open

Comments

@zstern
Copy link

zstern commented May 18, 2023

I am using age with sops.

age v1.1.1 & sops 3.7.3 on RHEL 7.9

I have my keys stored here: ~/.config/sops/age/keys.txt

I can execute sops <encrypted_file> and it will open up the decrypted version of the file in vim. Great.
I can execute sops -d -i <encrypted_file> and it will decrypt the file.

But when I run sops -e -i <unencrypted_file> i get the error “config file not found and no keys provided through command line options”

so then if I do specify the key in the command line using -a agedjfjsk... it will encrypt them again and the decryption again works fine. I'm confused because if the decryption works without specifying a key and its able to find the correct key saved via configuration then why won't the encryption work?

I at one time may have naively ran sops --config thinking it would provide to me config information but it was to set a config location and I didn't pass a file in. Perhaps that did something to alter the encryption configuration. If so, how do i reset it back? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant