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

Unable to forward mkpasswd result into agenix #211

Closed
jankaifer opened this issue Oct 15, 2023 · 3 comments
Closed

Unable to forward mkpasswd result into agenix #211

jankaifer opened this issue Oct 15, 2023 · 3 comments

Comments

@jankaifer
Copy link

When I try to run this:

mkpasswd -m sha-512 | agenix -e login-password.age

It fails with this error:

Password: cp: cannot stat '/tmp/tmp.eZpecGIAx7/login-password.age': No such file or directory

Error: Invalid recipient '[]'

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report  

An I using this wrong or is it agenix issue. I understood the doc, --help message that it will pipe anything I sent to it over | into that encrypted file.

@jankaifer
Copy link
Author

Even simple echo "stuff" | agenix -e password.age throws the same error. It seems to be issue with creating that file, but when I create the secret in interactive mode with vim it works fine.

@jankaifer
Copy link
Author

Now even simble agenix -e password-file.age throws the same error with Vim. Not sure what is wrong, will dig into it more.

@jankaifer
Copy link
Author

jankaifer commented Oct 16, 2023

The actual issue was that my ssh public keys were in wrong format, my parsing of that GitHub endpoint was flawed and It included empty arrays between those keys, after filtering those out it works well.

But I opened a PR to fix the weird cp warning that confused me.

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

Successfully merging a pull request may close this issue.

1 participant