PS D:\rc> .\rclone authorize "onedrive" If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxx Log in and authorize rclone for access Waiting for code... Got code Paste the following into your remote machine ---> {"access_token":"auth","expiry":"2020-01-28T21:59:50.7394539+08:00"} #完整复制此步给出的密钥包括{---}之间的所有内容。 <---End paste
在服务器上配置 rclone
安装 rclone (ubuntu18.04LTS)
1
curl https://rclone.org/install.sh | sudo bash #rclone on Linux/macOS/BSD systems
2020/01/28 21:12:30 NOTICE: Config file "/home/ubuntu/.config/rclone/rclone.conf" not found - using defaults No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n name> rc #输入一个名称 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 / Amazon Drive \ "amazon cloud drive" 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc) \ "s3" 5 / Backblaze B2 \ "b2" 6 / Box \ "box" 7 / Cache a remote \ "cache" 8 / Citrix Sharefile \ "sharefile" 9 / Dropbox \ "dropbox" 10 / Encrypt/Decrypt a remote \ "crypt" 11 / FTP Connection \ "ftp" 12 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage" 13 / Google Drive \ "drive" 14 / Google Photos \ "google photos" 15 / Hubic \ "hubic" 16 / JottaCloud \ "jottacloud" 17 / Koofr \ "koofr" 18 / Local Disk \ "local" 19 / Mail.ru Cloud \ "mailru" 20 / Mega \ "mega" 21 / Microsoft Azure Blob Storage \ "azureblob" 22 / Microsoft OneDrive \ "onedrive" 23 / OpenDrive \ "opendrive" 24 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift" 25 / Pcloud \ "pcloud" 26 / Put.io \ "putio" 27 / QingCloud Object Storage \ "qingstor" 28 / SSH/SFTP Connection \ "sftp" 29 / Transparently chunk/split large files \ "chunker" 30 / Union merges the contents of several remotes \ "union" 31 / Webdav \ "webdav" 32 / Yandex Disk \ "yandex" 33 / http Connection \ "http" 34 / premiumize.me \ "premiumizeme" Storage> onedrive #输入22或者onedrive,安装现在安装提示的序号填写 ** See helpfor onedrive backend at: https://rclone.org/onedrive/ **
Microsoft App Client Id Leave blank normally. Enter a string value. Press Enter for the default (""). client_id> #留空即可 Microsoft App Client Secret Leave blank normally. Enter a string value. Press Enter for the default (""). client_secret> #留空即可 Edit advanced config? (y/n) y) Yes n) No y/n> n Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes n) No y/n> n For this to work, you will need rclone available on a machine that has a web browser available. Execute the following on your machine (same rclone version recommended) : rclone authorize "onedrive" Then paste the result below: result> #输入第一步获取的客户端密钥包含{} Choose a number from below, or typein an existing value 1 / OneDrive Personal or Business \ "onedrive" 2 / Root Sharepoint site \ "sharepoint" 3 / Type in driveID \ "driveid" 4 / Type in SiteID \ "siteid" 5 / Search a Sharepoint site \ "search" Your choice> onedrive #输入1或者onedrive,输入想要链接的类型 Found 1 drives, please select the one you want to use: 0: OneDrive (business) id= Chose drive to use:> 0 #选择想要链接的磁盘id Found drive 'root' of type'business', URL: Is that okay? y) Yes n) No y/n> y -------------------- [rc] type = onedrive token = {"access_token":"auth","expiry":"2020-01-28T22:15:19.3495203+08:00"} drive_id = drive_type = business -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y #确认配置 Current remotes:
Name Type ==== ==== rc onedrive
e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q #q退出,配置完成