crestic icon indicating copy to clipboard operation
crestic copied to clipboard

password-command fails if arguments in string?

Open greg-minshall opened this issue 1 year ago • 1 comments

hi. thanks still much for crestic.

i get this error

bash archlinux (master): {49764} crestic lemur@ca-lacie-rugged-c stats
Resolving password failed: fork/exec pass backups/restic/california/0bee4de5-909a-468b-99e6-f4a899f3beb3: no such file or directory

the relevant (i think) bits of my crestic.cfg are

[@ca-lacie-rugged-c]
repo: /mnt/restic/repos/0bee4de5-909a-468b-99e6-f4a899f3beb3/restic
password-command: "pass backups/restic/california/0bee4de5-909a-468b-99e6-f4a899f3beb3"

[[email protected]]
arguments: ~

with CRESTIC_DRYRUN:

bash archlinux (master): {49765} CRESTIC_DRYRUN=1 crestic lemur@ca-lacie-rugged-c stats
             Warning: Executing in debug mode. restic will not run, backups are not touched!
        Config files: /home/minshall/.config/crestic/crestic.cfg, /etc/xdg/crestic/crestic.cfg
   Config files used: /home/minshall/.config/crestic/crestic.cfg
     Config sections: global, global.stats, @ca-lacie-rugged-c, @ca-lacie-rugged-c.stats, lemur@, [email protected], lemur@ca-lacie-rugged-c, [email protected]
Config sections used: global, @ca-lacie-rugged-c
        Env sections: global.environ, global.stats.environ, @ca-lacie-rugged-c.environ, @ca-lacie-rugged-c.stats.environ, [email protected], [email protected], [email protected], [email protected]
   Env sections used:
    Expanded command: restic stats --repo /mnt/restic/repos/0bee4de5-909a-468b-99e6-f4a899f3beb3/restic --password-command "pass backups/restic/california/0bee4de5-909a-468b-99e6-f4a899f3beb3"

and, if i copy and paste the "Expanded command" (thanks for which!) into my shell

bash archlinux (master): {49766} restic stats --repo /mnt/restic/repos/0bee4de5-909a-468b-99e6-f4a899f3beb3/restic --password-command "pass backups/restic/california/0bee4de5-909a-468b-99e6-f4a899f3beb3"
gpg: Note: sender requested "for-your-eyes-only"
Fatal: unable to open config file: stat /mnt/restic/repos/0bee4de5-909a-468b-99e6-f4a899f3beb3/restic/config: no such file or directory
Is there a repository at the following location?
/mnt/restic/repos/0bee4de5-909a-468b-99e6-f4a899f3beb3/restic

(i haven't yet done the init, having run into this.)

any ideas, things i, crestic, restic, might be doing wrong?

greg-minshall avatar Aug 04 '22 21:08 greg-minshall

I don't think you should provide the command in extra quotes.

nils-werner avatar Aug 05 '22 06:08 nils-werner

I don't think you should provide the command in extra quotes.

thanks -- that did it.

did this behavior change recently? i've been using the quotes since i started using crestic a few years ago, and it only failed in the last few weeks.

cheers.

greg-minshall avatar Aug 08 '22 23:08 greg-minshall

Not on our end, maybe restic changed it?

nils-werner avatar Aug 09 '22 05:08 nils-werner

ah, yeah -- likely. again, thanks.

greg-minshall avatar Aug 09 '22 12:08 greg-minshall