這篇文章是紀錄我如何使用google-drive-ocamlfuse掛載Google Drive到我(遠端)的ubuntu 16.04的電腦上
 
1. 首先安裝google-drive-ocamlfuse
Source: https://github.com/astrada/google-drive-ocamlfuse/wiki/Installation
這個步驟沒什麼難度,就照下面的指令打完收工
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse
 
 
2. 取得google drive授權
再來是要取得Google drive的API授權,這個就比較麻煩了!
 
到google cloud console選擇api and services
 
 
如果沒有project,要先創一個project
然後選擇API的Credentials
 
選擇Create credentials
1. 選擇其他"Other"
2. 選擇 product name, 例如"My OCAMLDrive".
3. 按"Create". 你會得到一組Client ID與Client Secret,要copy起來,等一下要用到
 
因為電腦是在遠端,只能用命令列,所以回到遠端要安裝的電腦上輸入下面的指令,要把剛剛得到的ClientID跟Client Secret打進去
google-drive-ocamlfuse -headless -label me -id #你剛剛得到的ClientID# -secret #你剛剛得到的Client Secret#
像下面這樣
google-drive-ocamlfuse -headless -label me -id 68746a54684sfdkjakg$TADG.apps.googleusercontent.com -secret ASGKAjdgoakgj4425
按Enter
然後你會得到如下的訊息
 
 
把那段網址複製,貼到本機端的瀏覽器上,會得到一段verification code
在把那段code貼回遠端
Please enter the verification code:
 
然後就可以準備把google drive給掛載起來啦!
先開個資料夾,然後掛起來,那個label是可以讓你同時掛載不同google帳號的drive用的,所以你可以取別名,沒設定的話會用預設值default
mkdir /my_mnt_dir
google-drive-ocamlfuse -label me /my_mnt_dir
arrow
arrow
    文章標籤
    google drive ubuntu
    全站熱搜

    Person 發表在 痞客邦 留言(0) 人氣()