2022年5月2日星期一

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

原文链接:https://www.chenweiliang.com/cwl-27743.html

如何解决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获取到的token长达4022个字符,但是在Putty软件最大限制可输入的字符长度为4095个字符,所以就出现了此问题。


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


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


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


rclone config file

查询配置文件结果如下 ▼


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”的问题。



欢迎转载《解决Error:failed to configure OneDrive:empty token found

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


网站地址:https://www.chenweiliang.com/



欲获取更多资讯内幕和秘技,欢迎进入Telegram频道:https://www.chenweiliang.com/go/tgchannel

没有评论:

发表评论