解決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,就出現以下錯誤▼

解決Rclone 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:”
用法:
rclone config [flags] rclone config [command]

可用指令:
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.

標誌:
-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

歡迎加入陳溈亮博客的Telegram 頻道,獲取最新更新!

🔔 率先在頻道置頂目錄獲取寶貴的《ChatGPT 內容行銷AI 工具使用指南》! 🌟
📚 這份指南蘊含價值巨大,🌟難逢的機遇,切勿錯失良機! ⏰⌛💨
喜歡就分享和按贊!
您的分享和按贊,是我們持續的動力!

 

發表評論

您的電子郵箱地址不會被公開。 必填項已用 * 標註

滾動到頂部