-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rclone-browser should not prompt for the config password if RCLONE_PASSWORD_COMMAND is set #79
Comments
thx for reporting. I will fix it in the next release |
Also, the prompt is not needed if rclone |
This is how it works at the moment... if RCLONE_PASSWORD_COMMAND is set and working you wont be asked for password. Have you tested it? It works for me perfectly |
I assume you refer to default rclone option list from preferences. Indeed this has to be rectified. As at the moment list is not used for listing remotes (this is when it is detected if password is needed). I will fix it in the next release. In the meantime use env variable RCLONE_PASSWORD_COMMAND. It works |
What do you mean by that? I reported the issue because rclone-browser didn't work for me (rclone itself works just fine). Every time I start rclone-browser it would ask me to enter configuration password even though I have RCLONE_PASSWORD_COMMAND environment variable properly set. I looked in your code and found that So my proposal was: Don't prompt for the password if either |
OK. I think I know what is happening. I will check it in a couple of hours. |
I am not checking any variables - decision to ask for password is made based on rclone working or not. If "rclone listremotes --long --ask-password=false" fails then RB will ask for password. |
You are absolutely right. I overlooked that part. In my case the rclone-browser is launched by the Windows Manager which do not have Unfortunately, when I try to overcome it by adding |
Correct - this part has to be fixed. |
to allow spaces inside option e.g. --password-command="pass rclone/config"
The issue is PITA... I thought that I solved this by using regex: RcloneBrowser/src/job_options.cpp Lines 136 to 144 in 3f11df2
but it works perfectly on macOS and Linux only. Fails on Windows. This is beauty of cross platform dev:) |
Default OS encoding-related issue maybe? |
After a bit more time wasted and I discovered what was wrong. My test case among others included option:
(this one is really pesky as contains space and quotes). Used regex is supposed to deal with it and it does - on both *nix and windows!! The culprit was rclone version configured on windows. I would appreciate if you try to test it. Please find below beta release with the fix. In addition this beta also has some look and feel improvements. Comments welcomed. |
What is Windows? :) |
What OS you are on then? I will release beta for you
… On 22 Feb 2020, at 19:51, myelsukov ***@***.***> wrote:
What is Windows? :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#79?email_source=notifications&email_token=ADXJHOUF24EOKLNYDDQOI5LREF63DA5CNFSM4KYT4OWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVJBMY#issuecomment-589992115>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADXJHOUBRGQHZVLHLOUHWXDREF63DANCNFSM4KYT4OWA>.
|
I am on Linux and Mac (company issued laptop). I can build Linux version myself but I would appreciate a DMG for Mac. |
Here you are:
https://1drv.ms/u/s!Aq335pidOrBV38Z3h5ww6JPVrUP2dg <https://1drv.ms/u/s!Aq335pidOrBV38Z3h5ww6JPVrUP2dg>
Fresh from the oven
… On 22 Feb 2020, at 19:54, myelsukov ***@***.***> wrote:
I am on Linux and Mac (company issued laptop). I can build Linux version myself but I would appreciate a DMG for Mac.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#79?email_source=notifications&email_token=ADXJHOVTLLG6MC3SFGIZ24TREF7GBA5CNFSM4KYT4OWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVJDFI#issuecomment-589992341>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADXJHOQ4DB4HLFCNH2Q5X5TREF7GBANCNFSM4KYT4OWA>.
|
OK. Linux version kind of works. I built the application off I will test Mac version shortly |
because |
also please note that default rclone options are not used for "rclone mount". There is dedicated prefs field you can use for it. |
Sorry, I meant that I put So, |
can you put this in for example defaultDownload options instead? then "dry run" some download and from jobs screen you can copy actual rclone command |
OK. I am trying to test Mac version right now. Need to upgrade rclone first. When I am done with Mac, I'll do that test |
Unfortunately Mac version doesn't work at all.
I tried default rclone options:
The I think you should add some kind of logging to the stderr. I need to run some errands now. I am not sure if I will be able to find time for testing today. Last thing: If I remove |
Phew!
Normally quotes are processed and removed by the shell. So rclone got the value of the |
thank you @myelsukov for your contribution
I believe you understand that my fix is "quick and dirty". The proper quoting/unquoting is one of the hardest problems. There can be insane combination of single quotes, double quotes, escaped single and double quotes, etc. So your regular expression is not the one that covers all the possible cases. At the very least, rclone-browser documentation should be very clear in regard of this problem. You should specify what is covered and what is not. |
Firstly thank you very much for your time on it. If more people would contribute this project could move forward much faster.
You are right in principle about this regex but Rclone Browser does not control rocket engines:) It would be nice that everything is perfect, tested and documented throughly but this is only hobby project (with obvious time and resources constraints) to provide something useful for others and myself.
I have tested your fix and as it covers all options I encountered so it is good enough for me.
I can specify:
…--option
--option parameter
--option=“parameter parameter1"
or any mix of them
It should suffice for rclone needs.
On 23 Feb 2020, at 09:00, myelsukov ***@***.***> wrote:
I believe you understand that my fix is "quick and dirty". The proper quoting/unquoting is one of the hardest problems. There can be insane combination of single quotes, double quotes, escaped single and double quotes, etc. So your regular expression is not the one that covers all the possible cases.
At the very least, rclone-browser documentation should be very clear in regard of this problem. You should specify what is covered and what is not.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#79?email_source=notifications&email_token=ADXJHOWECZZH27FSZBFHPNLREI3MHA5CNFSM4KYT4OWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVWPNQ#issuecomment-590047158>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADXJHOSXQABVIEWISIQX5QDREI3MHANCNFSM4KYT4OWA>.
|
Thank you for your application! |
It is not “mine”:) Open source:)
It just happened that I needed it and original version stopped working so I picked it up. I am even not software dev - so “dirty hacks” are all over the place.
My main objective was/is to make it working, add some low hanging fruits functionality and release for major OS.
There are parts I have no clue/time how to add or fix - I hope that at some stage more people will add their bits.
… On 23 Feb 2020, at 09:14, myelsukov ***@***.***> wrote:
Thank you for your application!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#79?email_source=notifications&email_token=ADXJHOXBLDQKZYETEU2VOKDREI5AVA5CNFSM4KYT4OWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVWW5A#issuecomment-590048116>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADXJHOQVT5LOHPSSN44NHH3REI5AVANCNFSM4KYT4OWA>.
|
Well, if you took the responsibility, then it is yours :) |
BTW, if you want smart quotes processing you can use a trick like this and let bash to deal with all that jazz:
The second For example:
This would also help with setting proper environment for the process using bash rules. Play with it. |
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)The text was updated successfully, but these errors were encountered: