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

add support for RESTIC_PASSWORD env variable #57

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

rluetzner
Copy link
Contributor

The restic tool doesn't have a CLI parameter for this, but it allows setting an env variable. We can check for that too and keep this as an env variable only.

This way we keep the safety of knowing that all necessary parameters (i.e. the repo and password options) are set.

This fixes #55 .

@drdo
Copy link
Owner

drdo commented Jul 31, 2024

Great! This is definitely better!

I tried something like this before the other solution but I ended up making Cli::restic_password a bool since the value itself is useless and clap then assumed it was to be a positional argument.

@drdo
Copy link
Owner

drdo commented Jul 31, 2024

Just one thing. Could you please sign the commits?

See instructions here: https://docs.github.com/en/authentication/managing-commit-signature-verification

@rluetzner
Copy link
Contributor Author

Will do. I've been meaning to set this up for ages.

The restic tool doesn't have a CLI parameter for this, but it allows
setting an env variable. We can check for that too and keep this as an
env variable only.

This way we keep the safety of knowing that all necessary parameters
(i.e. the repo and password options) are set.
@drdo drdo merged commit 803516e into drdo:main Jul 31, 2024
6 checks passed
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 this pull request may close these issues.

redu prompts for password or password file, even though RESTIC_PASSWORD env variable is set
2 participants