Malformed secret key: unknown type "age"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
Hi everyone,
I am not being to use sops with age. I can encrypt the files but when I try to decrypt them I bump into this error:
- | error at line 1: malformed secret key: unknown type "age"
So here is how I am working:
sops --encrypt -a $(grep -oP "public key: \K(.*)" $SOPS_AGE_KEY_FILE) --encrypted-regex "^(data|stringData)$" --in-place test2.yaml
sops --decrypt -a $(grep -oP "public key: \K(.*)" $SOPS_AGE_KEY_FILE) --encrypted-regex "^(data|stringData)$" --in-place test2.yaml
Failed to get the data key required to decrypt the SOPS file.
Group 0: FAILED
age1xdx0w6v7p8sqdcc6pmpyq7ym77q40fq8gckzugzrry22nuc60f8qqsufrt: FAILED
- | error at line 1: malformed secret key: unknown type "age"
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 can encrypt and decript using just age but with Sops.
And here are the versions of both Sops and Age:
sops --version
sops 3.7.3 (latest)
age --version
v1.1.1
Also, my issue seems to be similar to this with the difference is that one is specific to yubikey and mine is just with plain age.
Thanks,
Eduardo
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with sops 3.7.3, age 1.1.1, the shown encryption and decryption commands, and test2.yaml. Compare the plain-age case with the related issue 1103, then trace why decryption reports unknown type "age". Done means the cause is established and a verified resolution or precise limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100