"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
lib/oauthutil: Improved usability of config flows needing web browser
Ole Frostbeea4d511955
diff --git a/cmd/config/config.go b/cmd/config/config.goindex 5fb21a0cf..e3b916aad 100644--- a/cmd/config/config.go+++ b/cmd/config/config.go@@ -176,7 +176,7 @@ This will look something like (some irrelevant detail removed):"State": "*oauth-islocal,teamdrive,,","Option": {"Name": "config_is_local",- "Help": "Use auto config?\n * Say Y if not sure\n * Say N if you are working on a remote or headless machine\n",+ "Help": "Use web browser to automatically authenticate rclone with remote?\n * Say Y if the machine running rclone has a web browser you can use\n * Say N if running rclone on a (remote) machine without web browser access\nIf not sure try Y. If Y failed, try N.\n","Default": true,"Examples": [{diff --git a/docs/content/amazonclouddrive.md b/docs/content/amazonclouddrive.mdindex 2fd16db74..b0068f94f 100644--- a/docs/content/amazonclouddrive.md+++ b/docs/content/amazonclouddrive.md@@ -79,9 +79,10 @@ Token server url - leave blank to use Amazon's.token_url> Optional token URLRemote configMake sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config.-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/box.md b/docs/content/box.mdindex 906d5d0ad..69b8676a6 100644--- a/docs/content/box.md+++ b/docs/content/box.md@@ -57,9 +57,10 @@ Choose a number from below, or type in your own value\ "enterprise"box_sub_type>Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> y@@ -176,9 +177,10 @@ Already have a token - refresh?y) Yesn) Noy/n> y-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/drive.md b/docs/content/drive.mdindex 922961ef4..80d20f42f 100644--- a/docs/content/drive.md+++ b/docs/content/drive.md@@ -62,9 +62,10 @@ scope> 1Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login.service_account_file>Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine or Y didn't work+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> y@@ -91,8 +92,12 @@ d) Delete this remotey/e/d> y```+See the [remote setup docs](/remote_setup/) for how to set it up on a+machine with no Internet browser available.+Note that rclone runs a webserver on your local machine to collect the-token as returned from Google if you use auto config mode. This only+token as returned from Google if using web browser to automatically+authenticate. This onlyruns from the moment it opens your browser to the moment you get backthe verification code. This is on `http://127.0.0.1:53682/` and itmay require you to unblock it temporarily if you are running a hostdiff --git a/docs/content/dropbox.md b/docs/content/dropbox.mdindex e6c69654c..cb9af2e1c 100644--- a/docs/content/dropbox.md+++ b/docs/content/dropbox.md@@ -56,6 +56,16 @@ d) Delete this remotey/e/d> y```+See the [remote setup docs](/remote_setup/) for how to set it up on a+machine with no Internet browser available.++Note that rclone runs a webserver on your local machine to collect the+token as returned from Dropbox. This only+runs from the moment it opens your browser to the moment you get back+the verification code. This is on `http://127.0.0.1:53682/` and it+may require you to unblock it temporarily if you are running a host+firewall, or use manual mode.+You can then use it like this,List directories in top level of your dropboxdiff --git a/docs/content/googlecloudstorage.md b/docs/content/googlecloudstorage.mdindex 2a254848f..1932696f2 100644--- a/docs/content/googlecloudstorage.md+++ b/docs/content/googlecloudstorage.md@@ -117,9 +117,10 @@ Choose a number from below, or type in your own value\ "DURABLE_REDUCED_AVAILABILITY"storage_class> 5Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine or Y didn't work+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> y@@ -143,8 +144,12 @@ d) Delete this remotey/e/d> y```+See the [remote setup docs](/remote_setup/) for how to set it up on a+machine with no Internet browser available.+Note that rclone runs a webserver on your local machine to collect the-token as returned from Google if you use auto config mode. This only+token as returned from Google if using web browser to automatically+authenticate. This onlyruns from the moment it opens your browser to the moment you get backthe verification code. This is on `http://127.0.0.1:53682/` and thisit may require you to unblock it temporarily if you are running a hostdiff --git a/docs/content/googlephotos.md b/docs/content/googlephotos.mdindex bef6f3cf3..0076458ae 100644--- a/docs/content/googlephotos.md+++ b/docs/content/googlephotos.md@@ -62,9 +62,10 @@ y) Yesn) Noy/n> nRemote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> y@@ -88,8 +89,12 @@ d) Delete this remotey/e/d> y```+See the [remote setup docs](/remote_setup/) for how to set it up on a+machine with no Internet browser available.+Note that rclone runs a webserver on your local machine to collect the-token as returned from Google if you use auto config mode. This only+token as returned from Google if using web browser to automatically+authenticate. This onlyruns from the moment it opens your browser to the moment you get backthe verification code. This is on `http://127.0.0.1:53682/` and thismay require you to unblock it temporarily if you are running a hostdiff --git a/docs/content/hidrive.md b/docs/content/hidrive.mdindex 0a75686ca..750e0890a 100644--- a/docs/content/hidrive.md+++ b/docs/content/hidrive.md@@ -45,7 +45,10 @@ Leave blank normally.scope_access>Edit advanced config?y/n> n-Use auto config?+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y/n> yIf your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxxLog in and authorize rclone for accessdiff --git a/docs/content/onedrive.md b/docs/content/onedrive.mdindex 43750597b..4b46fac8c 100644--- a/docs/content/onedrive.md+++ b/docs/content/onedrive.md@@ -53,9 +53,10 @@ y) Yesn) Noy/n> nRemote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/pcloud.md b/docs/content/pcloud.mdindex cd15bb642..bbf06a141 100644--- a/docs/content/pcloud.md+++ b/docs/content/pcloud.md@@ -40,9 +40,10 @@ client_id>Pcloud App Client Secret - leave blank normally.client_secret>Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/premiumizeme.md b/docs/content/premiumizeme.mdindex 7b53b77b5..ae7f44372 100644--- a/docs/content/premiumizeme.md+++ b/docs/content/premiumizeme.md@@ -39,9 +39,10 @@ Storage> premiumizeme** See help for premiumizeme backend at: https://rclone.org/premiumizeme/ **Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/putio.md b/docs/content/putio.mdindex 79fb346a9..ae67f1eb6 100644--- a/docs/content/putio.md+++ b/docs/content/putio.md@@ -41,9 +41,10 @@ Storage> putio** See help for putio backend at: https://rclone.org/putio/ **Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> y@@ -76,8 +77,12 @@ q) Quit confige/n/d/r/c/s/q> q```+See the [remote setup docs](/remote_setup/) for how to set it up on a+machine with no Internet browser available.+Note that rclone runs a webserver on your local machine to collect the-token as returned from Google if you use auto config mode. This only+token as returned from put.io if using web browser to automatically+authenticate. This onlyruns from the moment it opens your browser to the moment you get backthe verification code. This is on `http://127.0.0.1:53682/` and thisit may require you to unblock it temporarily if you are running a hostdiff --git a/docs/content/remote_setup.md b/docs/content/remote_setup.mdindex b6d81c1b0..057e285da 100644--- a/docs/content/remote_setup.md+++ b/docs/content/remote_setup.md@@ -15,15 +15,16 @@ two ways of doing it, described below.## Configuring using rclone authorize ##-On the headless box run `rclone` config but answer `N` to the `Use-auto config?` question.+On the headless box run `rclone` config but answer `N` to the `Use web browser+to automatically authenticate?` question.```...Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yes (default)n) Noy/n> n@@ -99,15 +100,16 @@ Linux and MacOS users can utilize SSH Tunnel to redirect the headless box port 5```ssh -L localhost:53682:localhost:53682 username@remote_server```-Then on the headless box run `rclone` config and answer `Y` to the `Use-auto config?` question.+Then on the headless box run `rclone` config and answer `Y` to the `Use web+browser to automatically authenticate?` question.```...Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yes (default)n) Noy/n> ydiff --git a/docs/content/sharefile.md b/docs/content/sharefile.mdindex d85ec4b19..c02315872 100644--- a/docs/content/sharefile.md+++ b/docs/content/sharefile.md@@ -57,9 +57,10 @@ y) Yesn) Noy/n> nRemote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/yandex.md b/docs/content/yandex.mdindex f5716ca70..0093d6235 100644--- a/docs/content/yandex.md+++ b/docs/content/yandex.md@@ -34,9 +34,10 @@ client_id>Yandex Client Secret - leave blank normally.client_secret>Remote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yesn) Noy/n> ydiff --git a/docs/content/zoho.md b/docs/content/zoho.mdindex c0143dcbf..e24c5be17 100644--- a/docs/content/zoho.md+++ b/docs/content/zoho.md@@ -45,9 +45,10 @@ y) Yesn) No (default)y/n> nRemote config-Use auto config?- * Say Y if not sure- * Say N if you are working on a remote or headless machine+Use web browser to automatically authenticate rclone with remote?+ * Say Y if the machine running rclone has a web browser you can use+ * Say N if running rclone on a (remote) machine without web browser access+If not sure try Y. If Y failed, try N.y) Yes (default)n) Noy/n>diff --git a/lib/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.goindex a7326e886..cd9cb74d3 100644--- a/lib/oauthutil/oauthutil.go+++ b/lib/oauthutil/oauthutil.go@@ -480,7 +480,7 @@ func ConfigOAuth(ctx context.Context, name string, m configmap.Mapper, ri *fs.Reif in.Result == "false" {return fs.ConfigGoto(newState("*oauth-done"))}- return fs.ConfigConfirm(newState("*oauth-islocal"), true, "config_is_local", "Use auto config?\n * Say Y if not sure\n * Say N if you are working on a remote or headless machine\n")+ return fs.ConfigConfirm(newState("*oauth-islocal"), true, "config_is_local", "Use web browser to automatically authenticate rclone with remote?\n * Say Y if the machine running rclone has a web browser you can use\n * Say N if running rclone on a (remote) machine without web browser access\nIf not sure try Y. If Y failed, try N.\n")case "*oauth-islocal":if in.Result == "true" {return fs.ConfigGoto(newState("*oauth-do"))