linux上运行onedrive,linux挂载oneDrive

客户端授权

在本地Windows电脑上下载rclone,下载地址: 。然后解压出来,进入cmd,输入以下命令:

rclone authorize "onedrive"

之后会弹出窗口认证,然后复制token

安装rclone

安装

curl https://rclone.org/install.sh | sudo bash

之后:

Here is an example of how to make a remote called remote. First run:

rclone config

This will guide you through an interactive setup process:

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> n

name> remote

Type of storage to configure.

Enter a string value. Press Enter for the default ("").

Choose a number from below, or type in your own value

[snip]

XX / Microsoft OneDrive

\ "onedrive"

[snip]

Storage> 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> y

If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth

Log in and authorize rclone for access

Waiting for code...

Got code

Choose a number from below, or type in an existing value

1 / OneDrive Personal or Business

\ "onedrive"

2 / Sharepoint site

\ "sharepoint"

3 / Type in driveID

\ "driveid"

4 / Type in SiteID

\ "siteid"

5 / Search a Sharepoint site

\ "search"

Your choice> 1

Found 1 drives, please select the one you want to use:

0: OneDrive (business) id=b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk

Chose drive to use:> 0

Found drive 'root' of type 'business', URL: https://org-my.sharepoint.com/personal/you/Documents

Is that okay?

y) Yes

n) No

y/n> y

--------------------

[remote]

type = onedrive

token = {"access_token":"youraccesstoken","token_type":"Bearer","refresh_token":"yourrefreshtoken","expiry":"2018-08-26T22:39:52.486512262+08:00"}

drive_id = b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk

drive_type = business

--------------------

y) Yes this is OK

e) Edit this remote

d) Delete this remote

y/e/d> y

Paste the following into your remote machine --->

{"access_token":"xxxx"} #请复制{xx}整个内容(包括花括号),后面需要用到

之后在linux复制上面内容,auto config 选择no

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值