!sudo echo -ne '\n' | sudo add-apt-repository ppa:alessandro-strada/ppa >/dev/null 2>&1 # note: >/dev/null 2>&1 is used to supress printing
!sudo apt update >/dev/null 2>&1
!sudo apt install google-drive-ocamlfuse >/dev/null 2>&1
!google-drive-ocamlfuse
!sudo apt-get install w3m >/dev/null 2>&1 # to act as web browser
!xdg-settings set default-web-browser w3m.desktop >/dev/null 2>&1 # to set default browser
%cd /content
!mkdir gdrive
%cd gdrive
!mkdir "My Drive"
!google-drive-ocamlfuse "/content/gdrive/My Drive"
我收到以下错误。
You should specify a client id (-id) and a client secret (-secret)
有什么建议如何解决这个问题吗?
来自 README.md
首先,您必须设置 OAuth 2.0:
Google Drive API
。Desktop
作为 Application type
。Name
设置为您喜欢的任何值。这样您将获得
Client ID
和 Client secret
,您可以使用它们
访问您的云端硬盘。要授权 google-drive-ocamlfuse
,请传递客户端 ID
以及命令行上的客户端密码,例如:
google-drive-ocamlfuse -id xxxxxxxxxx.apps.googleusercontent.com -secret XXX-YYY-ZZZ
https://github.com/astrada/google-drive-ocamlfuse?tab=readme-ov-file#usage