NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=viTI1hvSD4t3spt6rsmmpQ NOTICE: Log in and authorize rclone for access NOTICE: Waiting for code... NOTICE: Got code Paste the following into your remote machine ---> {"access_token":"#############################"} <---End paste
注意:复制{access_token:###########}整段内容,保存好,后面要用
配置Rclone
服务器控制台输入rclone config命令
[root@VM-16-14-centos lighthouse]# rclone config 2022/08/07 19:36:33 NOTICE: Config file "/root/.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 #选n新建
nter name for new remote. name> onedrive #取个名字,随意ok
Option Storage. Type of storage to configure. Choose a number from below, or typein your own value. 1 / 1Fichier \ (fichier) 2 / Akamai NetStorage \ (netstorage) 3 / Alias for an existing remote \ (alias) 4 / Amazon Drive \ (amazon cloud drive) 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, Digital Ocean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Tencent COS and Wasabi \ (s3) 6 / Backblaze B2 \ (b2) 7 / Better checksums for other remotes \ (hasher) 8 / Box \ (box) 9 / Cache a remote \ (cache) 10 / Citrix Sharefile \ (sharefile) 11 / Combine several remotes into one \ (combine) 12 / Compress a remote \ (compress) 13 / Dropbox \ (dropbox) 14 / Encrypt/Decrypt a remote \ (crypt) 15 / Enterprise File Fabric \ (filefabric) 16 / FTP \ (ftp) 17 / Google Cloud Storage (this is not Google Drive) \ (google cloud storage) 18 / Google Drive \ (drive) 19 / Google Photos \ (google photos) 20 / HTTP \ (http) 21 / Hadoop distributed file system \ (hdfs) 22 / HiDrive \ (hidrive) 23 / Hubic \ (hubic) 24 / In memory object storage system. \ (memory) 25 / Internet Archive \ (internetarchive) 26 / Jottacloud \ (jottacloud) 27 / Koofr, Digi Storage and other Koofr-compatible storage providers \ (koofr) 28 / Local Disk \ (local) 29 / Mail.ru Cloud \ (mailru) 30 / Mega \ (mega) 31 / Microsoft Azure Blob Storage \ (azureblob) 32 / Microsoft OneDrive \ (onedrive) 33 / OpenDrive \ (opendrive) 34 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ (swift) 35 / Pcloud \ (pcloud) 36 / Put.io \ (putio) 37 / QingCloud Object Storage \ (qingstor) 38 / SSH/SFTP \ (sftp) 39 / Sia Decentralized Cloud \ (sia) 40 / Storj Decentralized Cloud Storage \ (storj) 41 / Sugarsync \ (sugarsync) 42 / Transparently chunk/split large files \ (chunker) 43 / Union merges the contents of several upstream fs \ (union) 44 / Uptobox \ (uptobox) 45 / WebDAV \ (webdav) 46 / Yandex Disk \ (yandex) 47 / Zoho \ (zoho) 48 / premiumize.me \ (premiumizeme) 49 / seafile \ (seafile) Storage> 32 #选择Microsoft OneDrive(不同版本的Rclone这里的数字可能稍有不同,注意看清)
Option client_id. OAuth Client Id. Leave blank normally. Enter a value. Press Enter to leave empty. client_id> #留空,直接回车
Option client_secret. OAuth Client Secret. Leave blank normally. Enter a value. Press Enter to leave empty. client_secret> #同样留空回车
Option region. Choose national cloud region for OneDrive. Choose a number from below, or typein your own string value. Press Enter for the default (global). 1 / Microsoft Cloud Global \ (global) 2 / Microsoft Cloud for US Government \ (us) 3 / Microsoft Cloud Germany \ (de) 4 / Azure and Office 365 operated by 21Vianet in China #世纪互联 \ (cn) region> 1 #这里是选择OneDrive的版本,我的是E5的网盘,选择Global
Edit advanced config? y) Yes n) No (default) y/n> n #留空回车
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
Option config_token. For this to work, you will need rclone available on a machine that has 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 "onedrive" Then paste the result. Enter a value. config_token> {"access_token":"##########"} #粘贴之前保存的信息
Option config_type. Type of connection Choose a number from below, or typein an existing string value. Press Enter for the default (onedrive). 1 / OneDrive Personal or Business \ (onedrive) 2 / Root Sharepoint site \ (sharepoint) / Sharepoint site name or URL 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite \ (url) 4 / Search for a Sharepoint site \ (search) 5 / Type in driveID (advanced) \ (driveid) 6 / Type in SiteID (advanced) \ (siteid) / Sharepoint server-relative path (advanced) 7 | E.g. /teams/hr \ (path) config_type> 1 #E5账号属于商业版,根据自己情况选择
Option config_driveid. Select drive you want to use Choose a number from below, or typein your own string value. Press Enter for the default (8888888888888888888888888888888888888888888888888). 1 / OneDrive (business) \ (8888888888888888888888888888888888888888888888888) config_driveid> 1 #这里是Rclone找到的网盘信息,这里出现什么选什么
Found drive "root" of type"business" URL: https://888888 #这里是你自己的URL
y) Yes (default) n) No y/n> y #选y
Configuration complete. Options: - type: onedrive - token: {"access_token":"#############"} - drive_id: ######### - drive_type: business Keep this "onedrive" remote? y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y #选y
Current remotes:
Name Type ==== ==== onedrive 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退出