Skip to main content

[軟體] 更新:雲端備份軟體:rclone。搞定google api篇。rclone 已封鎖存取權 錯誤代碼 401: invalid_client。

rclone 已封鎖存取權 錯誤代碼 401: invalid_client

自從這一篇之後,太忙,有段時間沒用
攘姨稚士: [軟體] 雲端備份軟體:rclone。非常有趣
https://kkkkdddd.blogspot.com/2024/05/rclone.html

偶爾一開,不得了,不能用了(內心一句:嘛呢)
顯示:rclone 已封鎖存取權 錯誤代碼 401: invalid_client
於是先更新了一下軟體 rclone-v1.70.2-windows-amd64

結果還是不能用…

好,那麼試著更新一下設定檔
噹噹,不能用,好你個google,
說什麼存取權被封鎖,九成九是有東西又改了

查到這一篇,心中有底了,大概是api在作祟
參見:
■使用 rclone 同步 Google Drive 檔案 [Jonathan's Wiki 筆記]
https://www.ichiayi.com/tech/rclone#%E8%A8%AD%E5%AE%9A_rclone_%E5%B0%8D_google_drivephotos_library_api_%E7%9A%84_config
主要是這段線索

進行 rclone config 的建立
rclone config
n) New Remote (建立一個新的遠端連結定義)
name> (設定這個遠端連結定義名稱) Exp. JonathanGooglePhotos
Storage> (選擇 Cloud Storage 類型)
如果是 Google Drive 就要選 → 15 Google Drive
如果是要同步 Google 相簿 就要選 → 16 Google Photos
client_id> (就直接輸入 oAuth 申請的 用戶端 ID)
client_secret> (就直接輸入 oAuth 申請的 用戶端密碼)
具體怎麼操作實在是沒有概念
兜兜轉轉查回rclone原廠的說明
■說明Google drive
https://rclone.org/drive/#making-your-own-client-id
Here is how to create your own Google Drive client ID for rclone:

    Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)

    Select a project or create a new project.

    Under "ENABLE APIS AND SERVICES" search for "Drive", and enable the "Google Drive API".

    Click "Credentials" in the left-side panel (not "Create credentials", which opens the wizard).

    If you already configured an "Oauth Consent Screen", then skip to the next step; if not, click on "CONFIGURE CONSENT SCREEN" button (near the top right corner of the right panel), then select "External" and click on "CREATE"; on the next screen, enter an "Application name" ("rclone" is OK); enter "User Support Email" (your own email is OK); enter "Developer Contact Email" (your own email is OK); then click on "Save" (all other data is optional). You will also have to add some scopes, including
決定留一下紀錄給後面有需要中文的有緣人
畢竟我也非資訊科原生
進到google api網站 → https://console.cloud.google.com/apis/dashboard
如圖 ↓


進去之後,通常什麼都沒有,先建立一個專案,我取名MyTest,如上圖
接著點選啟用api和服務

在空白處輸入google drive api


直到出現google drive api


繼續 ↓有些圖抓不到,口述有點亂:

左方的 憑證(Credentials)、OAuth同意畫面(Oauth consent screen) 記得要點選輸入
有個地方要選「外部」程式使用、軟體名稱寫rclone可也、email全部寫自己的即可
有個程式類型,選「電腦端程式」即可
有出現  client ID and client secret 要趕緊抄下來,設定rclone會用到
它會警示一旦關閉就查不到了


最後一步的"PUBLISH APP" 
找這個部分↓


以上完成後,進入命令列,整個程序重跑一次
最後一步記得不用讓它自動驗證,要選N,手動驗證!
中間再輸入client ID and client secret 即可大功告成!

最後,
順便說個好東西
輸入指令後,會下載一些檔案,就有gui可用了

    使用以下指令啟動WebUI,rc-user設定帳號為admin,rc-pass設定密碼為password。rc-addr後面參數接的是IP位址,localhost就是只有本機能存取Rclone WebUI,0.0.0.0則是開放遠端連線。

rclone rcd --rc-web-gui --rc-user=admin --rc-pass=password --rc-addr localhost:5572 --rc-web-gui-no-open-browser

    之後使用瀏覽器開啟http://localhost:5572。
第一次開啟的時候瀏覽器會要求帳號密碼,預設是 admin/password
下面gui圖形介面出來之後,還有一個帳密要輸入,查半天查一堆英文資料也沒有
最後一樣用 admin/password 即可通過
指令行出現gui有沒有很感動↓


參見:
■Rclone教學,簡單搞定Linux電腦雲端硬碟同步,支援Google雲端、OneDrive、Dropbox、MEGA · Ivon的部落格
https://ivonblog.com/posts/rclone-linux/



Comments

Popular posts from this blog

[紀錄] 玩了一下簡單的跑密碼測試:john the ripper / kali linux / hashcat

實在是有點懶得整理了 總之,為了玩 john the ripper 一開始是在win11環境下使用,怎麼用怎麼怪 後來就裝了kali linux,沒想到精簡版居然沒有gui linux功力實在不行,只好想辦法裝了gui 開啟 Kali Linux App,登入後,執行以下指令來安裝 Win-KeX 1 sudo apt update 2 sudo apt install -y kali-win-kex 要開啟 Kali Linux GUI ,則輸入 kex   在linux下的指令,就一切正常了 後來也順手試了一下hashcat 應該是試了7碼的字母組合,大約需要十幾二十分鐘 依我的功能,不太實用,但是真的挺有趣的 以下所用的參考文件,沒照順序排,很亂: 2.1 准备内核头文件 | 大学霸 Kali Linux 安全渗透教程 https://wizardforcel.gitbooks.io/daxueba-kali-linux-tutorial/content/8.html 在 WSL2 中安裝 Kali Linux | 亂馬客 https://rainmakerho.github.io/2022/06/15/kali-linux-win-wsl/ Kali Tools | Kali Linux Tools https://www.kali.org/tools/ Kali Installation Sizes | Kali Linux Documentation https://www.kali.org/docs/installation/installation-sizes/ James的資訊安全實驗室: John the Ripper (JTR) 密碼破解簡單使用教學 https://jameshclai.blogspot.com/2013/03/john-ripper-jtr.html iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天 https://ithelp.ithome.com.tw/m/articles/10193096 【教學】密碼恢復工具 Hashcat簡易基本教學(windows7/10) - opendanny的創作 - 巴哈姆特 https://home.gamer.com.tw/creationDetail.php?sn=3...

[軟體] 自問自答:V皮怎麼製作

這個年代很有趣,vtuber也是競爭激烈 因為覺得很有趣,稍微研究了一下簡單的方案 現在有方便的軟體 很會用繪圖軟體當然是自繪最佳 也有免費軟體 VRoid Studio畫皮 加上動態 + OBS直播 一整套簡單版的免費組合,至於要認真做大的,稍微花點錢 這年代出國都容易的世代,弄點軟體錢應該沒什麼大問題的 至於我,這年紀當vtuber,算天算地,不如算了吧 原理解說: (2025年更新版)如何畫出一個標準VTuber Live2D立繪+拆圖教學 | Moonku's https://moonku44.com/live2d-psd/ 如何成為VTuber? 當 VTuber 要準備什麼? 2025年終極教學 https://www.movavi.com/zh/learning-portal/how-to-become-vtuber.html 一些youtube影片 【VRoid Studio】10分鐘變虛擬主播/ 0基礎也可以/中文化 - YouTube https://www.youtube.com/watch?v=YAgc72eLsgo VRoid Studio VRM角色創建教學 - YouTube https://www.youtube.com/watch?v=CetmSjAnOMM 虛擬網紅快速入門~ VRoid + VUP + OBS !!! - YouTube https://www.youtube.com/watch?v=l-9aG36qwO4 剛好看到的單人案例: V皮跟本人一模一樣的天才大學生!?超多才多藝的新人登場...【兎寒Usamu】 - YouTube https://www.youtube.com/watch?v=avkGKwtMAjY