Error: Failed to get the data key required to decrypt the SOPS file.
Aniketvaidhya opened this issue · 1 comments
Hello,
I am getting below error,
I have specified the SOPS_AGE_KEY_FILE using the environment variables
export SOPS_AGE_KEY_FILE=$HOME/Downloads/key.txt
But I am getting this error :
│ Error: Failed to get the data key required to decrypt the SOPS file.
│
│ Group 0: FAILED
│ age1ufs2csswtmh232k34m4tvc0t8s90nltppsgkgl4uer8erv2ve5pqam36gw: FAILED
│ - | failed to load age identities: failed to parse
│ | 'SOPS_AGE_KEY' age identities: error at line 1: malformed
│ | secret key: separator '1' at invalid position: pos=0, len=59
│
│ 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.
│
│ with data.sops_file.secrets_backend,
│ on main.tf line 301, in data "sops_file" "secrets_backend":
│ 301: data "sops_file" "secrets_backend" {
│
Can someone help me to identify the issue?
You seem to have the environment variable SOPS_AGE_KEY
set, which seems to have an invalid value.