docs: refresh rclone authorize help

This commit is contained in:
Nick Craig-Wood 2020-05-04 10:40:26 +01:00
parent f2b1fedc4f
commit 7f8d74e903
2 changed files with 24 additions and 9 deletions

View file

@ -1,7 +1,7 @@
--- ---
title: "Remote Setup" title: "Remote Setup"
description: "Configuring rclone up on a remote / headless machine" description: "Configuring rclone up on a remote / headless machine"
date: "2016-01-07" date: "2020-05-04"
--- ---
# Configuring rclone on a remote / headless machine # # Configuring rclone on a remote / headless machine #
@ -16,7 +16,8 @@ two ways of doing it, described below.
## Configuring using rclone authorize ## ## Configuring using rclone authorize ##
On the headless box On the headless box run `rclone` config but answer `N` to the `Use
auto config?` question.
``` ```
... ...
@ -24,12 +25,19 @@ Remote config
Use auto config? Use auto config?
* Say Y if not sure * Say Y if not sure
* Say N if you are working on a remote or headless machine * Say N if you are working on a remote or headless machine
y) Yes y) Yes (default)
n) No n) No
y/n> n y/n> n
For this to work, you will need rclone available on a machine that has a web browser available. For this to work, you will need rclone available on a machine that has
Execute the following on your machine: a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize "amazon cloud drive" rclone authorize "amazon cloud drive"
Then paste the result below: Then paste the result below:
result> result>
``` ```
@ -68,7 +76,7 @@ y/e/d>
Rclone stores all of its config in a single configuration file. This Rclone stores all of its config in a single configuration file. This
can easily be copied to configure a remote rclone. can easily be copied to configure a remote rclone.
So first configure rclone on your desktop machine So first configure rclone on your desktop machine with
rclone config rclone config

View file

@ -429,14 +429,21 @@ func doConfig(id, name string, m configmap.Mapper, oauthConfig *oauth2.Config, o
break break
} }
if !isLocal() { if !isLocal() {
fmt.Printf("For this to work, you will need rclone available on a machine that has a web browser available.\n") fmt.Printf(`For this to work, you will need rclone available on a machine that has
fmt.Printf("Execute the following on your machine (same rclone version recommended) :\n") a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
`)
if changed { if changed {
fmt.Printf("\trclone authorize %q -- %q %q\n", id, oauthConfig.ClientID, oauthConfig.ClientSecret) fmt.Printf("\trclone authorize %q -- %q %q\n", id, oauthConfig.ClientID, oauthConfig.ClientSecret)
} else { } else {
fmt.Printf("\trclone authorize %q\n", id) fmt.Printf("\trclone authorize %q\n", id)
} }
fmt.Println("Then paste the result below:") fmt.Println("\nThen paste the result below:")
code := config.ReadNonEmptyLine("result> ") code := config.ReadNonEmptyLine("result> ")
token := &oauth2.Token{} token := &oauth2.Token{}
err := json.Unmarshal([]byte(code), token) err := json.Unmarshal([]byte(code), token)