resticprofile icon indicating copy to clipboard operation
resticprofile copied to clipboard

Trailing white space ignore in password.txt

Open sysk opened this issue 3 months ago • 1 comments

It seems that trailing whitespace is ignored in password.txt which breaks passwords that end with a space (which restic allows).

profiles.toml

version = "1"

[default]
  repository = "/some/path"
  password-file = "password.txt"

password.txt

some password that ends with a space 

sysk avatar Nov 14 '25 00:11 sysk

The space is indeed ignored, but resticprofile is not doing anything with the password file. Resticprofile is only building a restic command line. If you run your profile with the -v (--verbose) flag you can see what it's running:

[...]
starting command: /usr/local/bin/restic snapshots --password-file=examples/key --repo=/Volumes/backup --verbose=1
[...]

I just tried adding some spaces at the end of an existing password and my repository is still working fine.

creativeprojects avatar Nov 15 '25 15:11 creativeprojects