接着继续再添加一个 http_proxy,因为 cmd 它默认不走代理啊,所以只能这样了,或者你可以在 cmd 中执行 set http_proxy=http://ip:代理端口,这个算是临时代理吧,cmd 窗口一关闭就失效了
获取 refresh_token
直接执行 rclone config 即可
1 2 3 4 5 6 7
$ rclone config
No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n
输入 n,新建一个
1 2 3 4 5 6 7 8 9 10 11 12 13
name> goindex # 名字随便取 Type of storage to configure. Enter a string value. Press Enter for the default (""). Choose a number from below, or typein your own value 1 / 1Fichier \ "fichier" 2 / Alias for an existing remote \ "alias" ... 此处忽略 3-12 13 / Google Drive \ "drive" ... Storage> 13
我们选择 13,Google Drive
1 2 3 4 5 6 7 8 9 10
Google Application Client Id Setting your own is recommended. See https://rclone.org/drive/#making-your-own-client-id for how to create your own. If you leave this blank, it will use an internal key which is low performance. Enter a string value. Press Enter for the default (""). client_id> ******************* # 你的 client_id Google Application Client Secret Setting your own is recommended. Enter a string value. Press Enter for the default (""). client_secret> ******************* # 你的 client_secret
输入刚刚创建 OAuth client ID 成功之后的 client_id 和 client_secret
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Scope that rclone should use when requesting access from drive. Enter a string value. Press Enter for the default (""). Choose a number from below, or typein your own value 1 / Full access all files, excluding Application Data Folder. \ "drive" 2 / Read-only access to file metadata and file contents. \ "drive.readonly" / Access to files created by rclone only. 3 | These are visible in the drive website. | File authorization is revoked when the user deauthorizes the app. \ "drive.file" / Allows read and write access to the Application Data folder. 4 | This is not visible in the drive website. \ "drive.appfolder" / Allows read-only access to file metadata but 5 | does not allow any access to read or download file content. \ "drive.metadata.readonly" scope> 1
Fill in to access "Computers" folders (see docs), or for rclone to use a non root folder as its starting point.
Note that if this is blank, the first time rclone runs it will fill it in with the ID of the root folder.
Enter a string value. Press Enter for the default (""). root_folder_id> Service Account Credentials JSON file path Leave blank normally. Needed only if you want use SA instead of interactive login. Enter a string value. Press Enter for the default (""). service_account_file> Edit advanced config? (y/n) y) Yes n) No (default) y/n> n
输入 n
1 2 3 4 5 6 7
Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes (default) n) No y/n> n
输入 n
1 2 3
Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=8888888888888-p888888888888888091.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=0NMrhpEREX28r25plm3ZwA Log in and authorize rclone for access Enter verification code> *****************************************************************