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

input from stdin/pipe #154

Open
kradalby opened this issue Dec 7, 2024 · 0 comments
Open

input from stdin/pipe #154

kradalby opened this issue Dec 7, 2024 · 0 comments

Comments

@kradalby
Copy link

kradalby commented Dec 7, 2024

Hi!

I found myself wanting to script the rotation of a key I use with ragenix, and I have so far been unable to "trick" my editor to pick it up from from being piped/stdin and I was if anyone has considered adding a mode for updating a secret form pipe?

Usecase:

I have a script to generate a new Tailscale pre-auth-key that I want to use when setting up a new server, it outputs a limited key to stdin and I would like to do something like:

ts-preauthkey | ragenix --edit secret/tailscale-preauthkey.age

currently, I do it in a hacky way with a "fake-editor.sh":

/bin/bash
cat >"$1"
exit 0

and

ts-preauthkey | ragenix --editor fake-editor.sh --edit secret/tailscale-preauthkey.age

which works fine, but I suspect that this might be a usecase for others too.

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

No branches or pull requests

1 participant