-
Notifications
You must be signed in to change notification settings - Fork 996
Description
I'm using sops 3.11.0 and trying to decrypt a file. This seems to be failing with basically output about why it fails. I'm using the following command: sops -d secret_file. This is the output:
Failed to get the data key required to decrypt the SOPS file.
Group 0: FAILED
[AGE KEY]: FAILED
- | failed to create reader for decrypting sops data key with
| age: no identity matched any of the recipients. Did not find
| keys in locations 'SOPS_AGE_SSH_PRIVATE_KEY_FILE',
| '/home/<user>/.ssh/id_rsa', 'SOPS_AGE_KEY',
| 'SOPS_AGE_KEY_FILE', and 'SOPS_AGE_KEY_CMD'.
[ANOTHER KEY]: FAILED
...
Recovery failed because no master key was able to decrypt the file. In
order for SOPS to recover the file, at least one key has to be successful,
but none were.
I have an ssh key file which should be able to decrypt this file, and I'm using the following command to try and get sops to recognize that:
env SOPS_AGE_SSH_PRIVATE_KEY_FILE=/path/to/ssh_key sops -d secret_file. This produces the following output:
Failed to get the data key required to decrypt the SOPS file.
Group 0: FAILED
[AGE KEY]: FAILED
- | failed to create reader for decrypting sops data key with
| age: no identity matched any of the recipients. Did not find
| keys in locations '/home/<user>/.ssh/id_rsa',
| 'SOPS_AGE_KEY', 'SOPS_AGE_KEY_FILE', and 'SOPS_AGE_KEY_CMD'.
[ANOTHER KEY]: FAILED
...
Recovery failed because no master key was able to decrypt the file. In
order for SOPS to recover the file, at least one key has to be successful,
but none were.
So it... checks the path? But seems to quietly fail???? The only weirdness here that I can think of is that the ssh key file is in a linked directory. It's annoying that I'm just getting - no additional info about WHY the key I provided fails.
When I run the command with --verbose I just get the following additional output:
[AGE] INFO[0000] Decryption failed
[PGP] INFO[0003] Decryption failed fingerprint=[ANOTHER KEY]
Anyways - not really sure what to do with this or how to even start debugging this since there is no real output.