Closed mpilgrim8 closed 4 years ago
I really appreciate the great bug report and apologize for the slip up. I was easily able to replicate and fix the error. I have uploaded the new version to github (version 1.15.2). I will be adding some more tests before I upload to pypi, but I should do that in the next few days.
Thank you!
I'd like to wait for you to try out the new version before I promote it to pypi. So if you do test it please let me know the result, and if you plan to wait for pyip, please let me know that too.
Hi -- thanks for the very fast response! I had it installed via PIP on MacOS and the Arch Linux AUR on Manjaro Linux, but I just did a local/user install via Git repo to test it.
It works, although I have a question on one minor detail. If I hard-code the file path like this:
passcommand = 'gpg -qd /home/user/.store-auth.gpg'
...it works:
$ emborg -c vault list
vault-2020-03-17T15:16:18
But if I try to abstract it with "{home_dir}" like this:
passcommand = 'gpg -qd {home_dir}/.store-auth.gpg'
...it fails:
$ emborg -c vault list
emborg error: borg list:
gpg: can't open '{home_dir}/.store-auth.gpg': No such file or directory
gpg: decrypt_message failed: No such file or directory
passcommand supplied in BORG_PASSCOMMAND failed: Command '['gpg', '-qd', '{home_dir}/.store-auth.gpg']' returned non-zero exit status 2.
I am using the "{home_dir}" parameter successfully elsewhere in the main config file:
default_mount_point = '{home_dir}/Downloads/restore'
...but it doesn't seem to work here. Or is parameter interpolation not supposed to work in the "passcommand" circumstance?
Thanks!
Oh, that is odd. I used
passcommand = 'cat {config_dir}/passphrase'
in my tests and it worked fine. I think Borg used the error message from cat as the passphrase and did not notice that the exit status was nonzero. Any way, it is fixed now if you want to give it another try.
Works perfectly! Thanks again! I tested it on both Linux and MacOS, and both work flawlessly.
I have done a release and updated pypi. Latest version is 1.16. Thank you so much for your help.
Hi,
I can't seem to get the "passcommand" config directive to work as it does with plain Borg itself, but perhaps I am doing something incorrectly that is Emborg-specific, but wasn't sure if it was a bug?
passcommand = 'gpg -qd /home/user/.store-auth.gpg'
I've always had this same setup working with plain Borg itself, as well as with Restic and Rclone using these env vars:
So it works fine with plain Borg and others, but not with Emborg (neither the "BORG_PASSCOMMAND" env var, nor the explicit Emborg "passcommand" config directive). Everything else with Emborg works fine, so long as I don't use any encryption. But with encryption, I have to use plain Borg directly.
I get this error with verbose enabled:
The log largely says the same:
I get the same behavior on both Linux (Manjaro) and MacOS (Catalina/10.15), both with the same Emborg/Borg versions: