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

Implement --insecure-no-password option. #4808

Merged
merged 3 commits into from
May 24, 2024

Conversation

MichaelEischer
Copy link
Member

@MichaelEischer MichaelEischer commented May 18, 2024

What does this PR change? What problem does it solve?

Implement #4326 (comment) . Different from that comment,
there are two additional options --from-insecure-no-password and --new-insecure-no-password. --from-insecure-no-password is used for commands that require specifying a source repository, and --new-insecure-no-password for the key add and key passwd commands.

Those options are required to allow copying from a repository without password to one with a password. Or the add/set an new empty password.

Was the change previously discussed in an issue or on the forum?

Fixes #1786
Fixes #4326
Replaces https://github.com/restic/restic/pull/4698/files

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

@MichaelEischer MichaelEischer marked this pull request as ready for review May 18, 2024 17:23
@MichaelEischer MichaelEischer mentioned this pull request May 18, 2024
8 tasks
@allmazz
Copy link

allmazz commented May 18, 2024

nice idea, I hope it will be merged soon!

The current pattern of using a global options variable is problematic.
This also includes two derived options `--from-insecure-no-password`
used for commands that require specifying a source repository. And
`--new-insecure-no-password` for the `key add` and `key passwd`
commands.

Specifying `--insecure-no-password` disabled the password prompt and
immediately uses an empty password. Passing a password via CLI option or
environment variable at the same time is an error.
Copy link
Member Author

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichaelEischer MichaelEischer merged commit 80132e7 into restic:master May 24, 2024
13 checks passed
@MichaelEischer MichaelEischer deleted the insecure-no-password branch May 24, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Backup without password Allow empty passwords
2 participants