0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

google-drive-ocamlfuse - Gooole Driveをマウント

Last updated at Posted at 2025-04-27

概要

[自分メモ]
Google Drive を Ubuntuで参照したい。
個人使用目的
※一般公開OAuthアプリは要審査

環境

  • wsl: 2.3.26.0
  • Ubuntu: 24.04.1 LTS

クライアント導入

sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt update
sudo apt install -y google-drive-ocamlfuse

Google Driveの設定

  1. Google Drive API設定ページ
  2. APIを有効にする(MANAGE)
  3. [OAuth consent screen(同意画面)] > [Clients] > クライアント新規作成 > "デスクトップアプリ"を追加
  4. Client ID と Client secret を採取
  5. [Audience] > [Test user] > 利用者(自分)のgmailアドレス追加

使用

認証とマウント
GOOGLEDRIVE_CLIENT_ID=xxxxxxxxxx.apps.googleusercontent.com
GOOGLEDRIVE_SECRET=XXX-YYY-ZZZ
mkdir ~/gdrive
google-drive-ocamlfuse -id $GOOGLEDRIVE_CLIENT_ID -secret $GOOGLEDRIVE_SECRET ~/gdrive

未認証の場合ブラウザが開く。認証後、ブラウザクローズ。 GUIがない場合は -headlessオプションをつける

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?