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> n #选择创建新的remote
Enter name for new remote. name> test#取一个名字
Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. 1 / 1Fichier \ (fichier) 2 / Akamai NetStorage \ (netstorage) 3 / Alias for an existing remote \ (alias) 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others \ (s3) 5 / Backblaze B2 \ (b2) 6 / Better checksums for other remotes \ (hasher) 7 / Box \ (box) 8 / Cache a remote \ (cache) 9 / Citrix Sharefile \ (sharefile) 10 / Combine several remotes into one \ (combine) 11 / Compress a remote \ (compress) 12 / Dropbox \ (dropbox) 13 / Encrypt/Decrypt a remote \ (crypt) 14 / Enterprise File Fabric \ (filefabric) 15 / FTP \ (ftp) 16 / Google Cloud Storage (this is not Google Drive) \ (google cloud storage) 17 / Google Drive \ (drive) 18 / Google Photos \ (google photos) 19 / HTTP \ (http) 20 / Hadoop distributed file system \ (hdfs) 21 / HiDrive \ (hidrive) 22 / ImageKit.io \ (imagekit) 23 / In memory object storage system. \ (memory) 24 / Internet Archive \ (internetarchive) 25 / Jottacloud \ (jottacloud) 26 / Koofr, Digi Storage and other Koofr-compatible storage providers \ (koofr) 27 / Linkbox \ (linkbox) 28 / Local Disk \ (local) 29 / Mail.ru Cloud \ (mailru) 30 / Mega \ (mega) 31 / Microsoft Azure Blob Storage \ (azureblob) 32 / Microsoft Azure Files \ (azurefiles) 33 / Microsoft OneDrive \ (onedrive) 34 / OpenDrive \ (opendrive) 35 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH) \ (swift) 36 / Oracle Cloud Infrastructure Object Storage \ (oracleobjectstorage) 37 / Pcloud \ (pcloud) 38 / PikPak \ (pikpak) 39 / Proton Drive \ (protondrive) 40 / Put.io \ (putio) 41 / QingCloud Object Storage \ (qingstor) 42 / Quatrix by Maytech \ (quatrix) 43 / SMB / CIFS \ (smb) 44 / SSH/SFTP \ (sftp) 45 / Sia Decentralized Cloud \ (sia) 46 / Storj Decentralized Cloud Storage \ (storj) 47 / Sugarsync \ (sugarsync) 48 / Transparently chunk/split large files \ (chunker) 49 / Union merges the contents of several upstream fs \ (union) 50 / Uptobox \ (uptobox) 51 / WebDAV \ (webdav) 52 / Yandex Disk \ (yandex) 53 / Zoho \ (zoho) 54 / premiumize.me \ (premiumizeme) 55 / seafile \ (seafile) Storage> 51 #选择WebDav(是什么就输入什么数字,不一定是一样的)
Option url. URL of http host to connect to. E.g. https://example.com. Enter a value. url> https://xxx-my.sharepoint.com/personal/xxxxxxxxx_edu_cn/Documents #你的sharepoint地址,登录网页版OneDrive后在地址栏即可看到,一般为https://xxx-my.sharepoint.com/personal/xxxxxxxxx_edu_cn/_layouts/xx/onedrive.aspx?view=0,将后面没用的路径删除然后加上Documents
Option vendor. Name of the WebDAV site/service/software you are using. Choose a number from below, or type in your own value. Press Enter to leave empty. 1 / Fastmail Files \ (fastmail) 2 / Nextcloud \ (nextcloud) 3 / Owncloud \ (owncloud) 4 / Sharepoint Online, authenticated by Microsoft account \ (sharepoint) 5 / Sharepoint with NTLM authentication, usually self-hosted or on-premises \ (sharepoint-ntlm) 6 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol \ (rclone) 7 / Other site/service or software \ (other) vendor> 4 #这里选择SharePoint Online, authenticated by Microsoft account
Option user. User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'. Enter a value. Press Enter to leave empty. user> xxx@xxx.edu.cn #用户名为你的微软账号用户名
Option pass. Password. Choose an alternative below. Press Enter for the default (n). y) Yes, type in my own password g) Generate random password n) No, leave this optional password blank (default) y/g/n> y #这里选择已有密码 Enter the password: password: #输入你的密码(不会显示) Confirm the password: password: #再次输入(不会显示)
Option bearer_token. Bearer token instead of user/pass (e.g. a Macaroon). Enter a value. Press Enter to leave empty. bearer_token> #直接回车
Edit advanced config? y) Yes n) No (default) y/n> #直接回车
Configuration complete. Options: - type: webdav - url: https://xxx-my.sharepoint.com/personal/xxx/Documents - vendor: sharepoint - user: xxx@xxx.edu.cn - pass: *** ENCRYPTED *** Keep this "test" remote? y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> #直接回车
Current remotes:
Name Type ==== ==== test webdav
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 #退出配置交互
配置完成后我们开始挂载。
创建挂载点文件夹,例如 /mnt/onedrive
1
mkdir /mnt/onedrive
最后挂载
1
rclone mount test:/path/you/want/to/mount /mnt/onedrive --allow-other --vfs-cache-mode writes --allow-non-empty
将 /path/you/want/to/mount 替换为你的实际路径
tips: 如果没安装 fuse3 包可能会出现 failed to mount FUSE fs: fusermount: exec: "fusermount3": executable file not found in $PATH ,导致无法完成挂载。