Init with empty password creates directory structure, but no config file


I am testing out restic, and wondered if it would work without giving a password on init. So I just pressed enter twice when asked for password.

$ restic init --repo .
enter password for new repository:
enter password again:
an empty password is not a password

This resulted in a bunch of expected directories being created, but no config file.

I now understand that a password is required, but I think that creating a partially incomplete repository even though no password was given is a (minor) bug. Thoughts?

Best Regards,

I agree, you shouldn’t get a stack trace :slight_smile: Can you open an issue over at GitHub?

Sure, I will.
Thank you!

EDIT: OK, a stacktrace was unexpected. But what about the incomplete repo?

Ping @rawtaz . I suspect you were not notified about my edit above…

Although I’m not familiar with the code at all, I would suspect the two to be related.

If the situation is handled properly the repo will only be created (and then completely) when a proper password is provided. Please mention in the symptoms you listed in your first post in this thread, and it will be good.

Created issue Init with empty password causes 1) directory structure without config file and 2) strack trace · Issue #3214 · restic/restic · GitHub .