RcloneBrowser: rclone-browser should not prompt for the config password if RCLONE_PASSWORD_COMMAND is set
rclone-browser should not prompt for the config password if RCLONE_PASSWORD_COMMAND environment variable is set. rclone will use that command to get the configuration password (https://rclone.org/docs/#configuration-encryption)
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 30 (14 by maintainers)
Commits related to this issue
- make --password-command working if defined #79 — committed to kapitainsky/RcloneBrowser by kapitainsky 4 years ago
- changed default rclone options parsing - #79 to allow spaces inside option e.g. --password-command="pass rclone/config" — committed to kapitainsky/RcloneBrowser by kapitainsky 4 years ago
- further improved rclone options parsing - #79 — committed to kapitainsky/RcloneBrowser by kapitainsky 4 years ago
- further improved rclone options parsing - #79 thank you @myelsukov for your contribution — committed to kapitainsky/RcloneBrowser by kapitainsky 4 years ago
BTW, if you want smart quotes processing you can use a trick like this and let bash to deal with all that jazz:
bash -c 'exec "$@"' bash the-rest-of-the-desired-command-lineThe second
bashis just a$0for theexec "$@"script. You can put anything there.For example:
bash -c 'exec "$@"' bash /usr/bin/rclone listremotes --long --password-command="pass rclone/config"orbash -c 'exec "$@"' bash /usr/local/bin/rclone listremotes --long --password-command 'pass "my rclone/config"'This would also help with setting proper environment for the process using bash rules. Mac OS GUI applications are running in the minimal environment that does not include stuff from
~/.bashrcand/or${BASH_ENV}so I have to use full paths in the rclone default options for the Mac version of the rclone-browser.Play with it.
Phew! After some debugging (Linux) I found that this works:
Normally quotes are processed and removed by the shell. So rclone got the value of the
--password-commandparameter as"pass rclone/config"obviously, it could not find an executable"pass rclone/config".