slok / agebox

Age based repository file encryption gitops tool
Apache License 2.0
210 stars 15 forks source link

cannot decrypt file after encryption using personal RSA keys #181

Open illegalprime opened 1 year ago

illegalprime commented 1 year ago

I have a key pair that I use for everything, I wanted to test this out with it but I it will not decrypt:

$ agebox validate
INFO[0000] Using 1 tracked files                         version=0.6.1
WARN[0000] Could not load private key: invalid private key  key=/home/michael/.ssh/michael_rsa svc=storage.fs.KeyRepository version=0.6.1
WARN[0000] Could not load private key: invalid private key  key=/home/michael/.ssh/michael_rsa.pub svc=storage.fs.KeyRepository version=0.6.1
INFO[0000] Loaded private keys                           keys=2 svc=storage.fs.KeyRepository version=0.6.1
ERRO[0000] Invalid secret: could not decrypt secret: age could not decrypt the secret: no identity matched any of the recipients  secret-id=nixops/secrets/localstate.nixops svc=box.validate.Service version=0.6.1

yes, this key has a password on it, but it doesn't work with the --passphrase flag either. I've used this key for so many things, I must be doing something wrong here.

Thanks!