解决Rclone Error:failed to configure OneDrive:empty token found

如何解决Rclone自建微软OneDrive的API出现“Error:failed to configure OneDrive:empty token found”错误?

在Rclone配置微软Onedrive的自建API,需要配置config_token ▼

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" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Then paste the result.
Enter a value.
config_token>

在本地电脑的Rclone获取到token后,然后回到SSH输入token,就出现以下错误 ▼

解决Error:failed to configure OneDrive:empty token found

Couldn't decode response – try again (make sure you are using a matching version of rclone on both sides: invalid character ‘e' looking for beginning of value

Error: failed to configure OneDrive: empty token found – please run “rclone config reconnect 22:”
Usage:
rclone config [flags] rclone config [command]

Available Commands:
create Create a new remote with name, type and options.
delete Delete an existing remote.
disconnect Disconnects user from remote
dump Dump the config file as JSON.
file Show path of configuration file in use.
password Update password in an existing remote.
paths Show paths used for configuration, cache, temp etc.
providers List in JSON format all the providers and options.
reconnect Re-authenticates user with remote.
show Print (decrypted) config file, or the config for a single remote.
touch Ensure configuration file exists.
update Update options in an existing remote.
userinfo Prints info about logged in user of remote.

Flags:
-h, –help help for config

Additional help topics:
rclone config edit Enter an interactive configuration session.

Use “rclone [command] –help” for more information about a command.
Use “rclone help flags” for to see the global flags.
Use “rclone help backends” for a list of supported services.

2022/05/02 23:50:56 Fatal error: failed to configure OneDrive: empty token found – please run “rclone config reconnect 22:”

为何Rclone会出现“Couldn't decode response – try again”错误?

这是因为所有 Rclone版本不接受超过 4096 的token。

问题是生成token的 Rclone 曾经是非编码的,并且总是小于 4096。

在Rclone 1.56 版之后,授权代码开始被编码,因此返回被编码的token超过4096个字符数 ,所以无法在SSH粘贴到全部的token字段。

但是,目前在Rclone获取到的token长达4022个字符,就出现了此问题。

如何解决Rclone显示“Couldn't decode response – try again”错误?

可以在本地电脑配置好之后,直接把本地电脑的rclone.conf配置文件里的内容,复制到Linux服务器上rclone.conf配置文件。

分别在本地电脑和服务器上,输入以下命令可查看Rclone配置文件位置命令 ▼

rclone config file

查询Rclone配置文件,获取到的结果如下 ▼

rclone config file
Configuration file is stored at:
/root/.config/rclone/rclone.conf
  • 只需把本地电脑的配置文件rclone.conf里的内容,复制到Linux服务器上rclone.conf配置文件,就能够解决Rclone配置Onedrive时显示“Error:failed to configure OneDrive:empty token found”的问题。

希望陈沩亮博客( https://www.chenweiliang.com/ ) 分享的《解决Rclone Error:failed to configure OneDrive:empty token found》,对您有帮助。

欢迎分享本文链接:https://www.chenweiliang.com/cwl-27743.html

解锁 AI 助力,告别低效工作!🔓💼

🌟 立刻在频道置顶目录中,抢先体验这些神奇的AI神兵利器!🌟

喜欢就分享和按赞!您的分享和按赞,是我们持续的动力!

 

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

滚动到顶部