0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ubuntu 22.04.5 に google-drive-ocamlfuse 0.7.32 を導入したメモ

Last updated at Posted at 2025-05-21

この記事の目的

ubuntuにgoogle-drive-ocamlfuseを導入した際、ほんの少し手こずったので備忘録として作成しました。

やり方

1. google-drive-ocamlfuseをインストール

こちらを参考に下記コマンドを実行しました。

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

2. Google CloudからクライアントID・シークレットを取得

こちらを参考にしました。プロジェクト名をgdrive-ocamlfuse、アプリ名をGoogle Drive for UbuntuとしてIDとシークレットを取得しました。

3. google-drive-ocamlfuseを設定後、Google Driveをマウント

homeディレクトリにフォルダgdriveを作成したのち、下記コマンドを実行しました。

google-drive-ocamlfuse -id (省略).apps.googleusercontent.com -secret GOCSPX-(省略)
google-drive-ocamlfuse ~/gdrive

上記1つ目のコマンドを実行すると、『「Google Drive for Ubuntu」にアクセスを許可しますか?』というようなブラウザ画面が開かれるので、許可します。

以上がgoogle-drive-ocamlfuse(0.7.32)の導入方法です。

所見

Ubuntu標準のオンラインアカウントを使ってもGoogle Driveにアクセスは出来ますが、VSCodeでcode-workspaceファイルを起動できない点が不満でした。その点こちらはオンラインアカウントと違ってマウント扱い?(よく分かっていない)のためcode-workspaceを起動でき便利です。

手こずったこと

当初、google-drive-ocamlfuseコマンドのみで認証設定ができるとの記事をもとに試したところ、Error: You should specify a client id (-id) and a client secret (-secret)というエラーを吐かれてしまいました。
こちらの記事によると、バージョンの違いによって挙動が異なるようです。0.7.30では一発認証が出来た一方で、0.7.32では認証設定を自分で行う必要があるようでした。(少なくともUbuntu 22.04.5では)

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?