You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make rclone config passwd act as sudo passwd #3386
Currently, when you use rclone, you need to enter the passwd every time. Could it maybe act like the sudo password, that it will be stored for x minutes in the terminal window? I'd actually prefer it stored until the window is closed.
sudo works by keeping an on disk database of things in /var/run/sudo I think. Rclone would have to do something similar to make this work exactly like sudo, and it would have to actually store the password on disk. I'm not dead keen on doing either.
There is also another option, at the same security than integrating with the OS keyring, which can be done today with zero code changes: using a secure tool to make the RCLONE_CONFIG_PASSenvironment variable visible.
Hello @ivandeex I think there is a misunderstanding here. Both envchain and gopass already worked with rclone, even before the --password-command, since these two tools work by setting the RCLONE_CONFIG_PASS environment variable. Or am I missing something ?
Activity
ncw commentedon Jul 29, 2019
You can do this with a small shell script or an alias
just run
rclonepassto read the password into that environment variable and it will last for the duration of the terminal session.jtagcat commentedon Jul 30, 2019
I wish that could happen automatically before an rclone command is ran. I haven't done go before therefore I opened an issue.
ncw commentedon Jul 30, 2019
sudoworks by keeping an on disk database of things in/var/run/sudoI think. Rclone would have to do something similar to make this work exactly like sudo, and it would have to actually store the password on disk. I'm not dead keen on doing either.Perhaps a better idea would be integrate rclone with the OSes keyring manager maybe using a library like this: https://github.com/zalando/go-keyring
marco-m commentedon Nov 16, 2019
There is also another option, at the same security than integrating with the OS keyring, which can be done today with zero code changes: using a secure tool to make the
RCLONE_CONFIG_PASSenvironment variable visible.I know at least 2 such tools:
For example with
envchain, the rclone invocationrclone ...would need to be prepended bymarco-m commentedon Nov 16, 2019
I investigated a bit that library. Following some PRs there, I found alternative https://github.com/keybase/go-keychain, which seems to be better maintained.
ankur0493 commentedon Apr 5, 2020
https://github.com/keybase/go-keychain is only for macOS and Linux whereas https://github.com/zalando/go-keyring supports windows as well.
ncw commentedon Apr 11, 2020
Now that rclone supports the --password-command flag it should be easy to integrate any 3rd party password manager provided they have a cli interface.
I think that is my preferred solution for the moment, rather than attempt to integrate a myriad of password managers.
What do you think?
ivandeex commentedon Nov 14, 2020
@jtagcat @marco-m @ankur0493
Please try
rclone --password-commandwith envchain or gopass (see links to commands above).marco-m commentedon Nov 14, 2020
Hello @ivandeex I think there is a misunderstanding here. Both
envchainandgopassalready worked withrclone, even before the--password-command, since these two tools work by setting theRCLONE_CONFIG_PASSenvironment variable. Or am I missing something ?ivandeex commentedon Nov 14, 2020
@marco-m
Do you mean this issue can be closed?
Misunderstanding is rather on my side.
I'm just being triaging old and stale tickets.
marco-m commentedon Nov 14, 2020
To my understanding yes. The first comment I wrote on this issue was already to propose an alternative to the OP.
Note on the other hand that I am not the OP :-)
And thanks for your housekeeping work, closing stale stuff is good.
ivandeex commentedon Nov 14, 2020
@jtagcat Does your problem persist?