-
Notifications
You must be signed in to change notification settings - Fork 9
Gdrive installation
👉 If you use our image it's already installed.
Gdrive is a command-line tool for managing your Google Gdrive from the Raspberry Pi.
However, if you want to install it on another RPi, here are the steps.
Start with the installation of Googles GO.
$ wget https://go.dev/dl/go1.17.7.linux-armv6l.tar.gz
$ sudo tar -C /usr/local -xzf go1.17.7.linux-armv6l.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
# check the version
$ go version
# output go version go1.17.7 linux/arm
$ wget https://go.dev/dl/go1.17.7.linux-arm64.tar.gz
$ sudo tar -C /usr/local -xzf go1.17.7.linux-arm64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
# check the version
$ go version
# output go version go1.17.7.7 linux/arm64
The next step is building gdrive.
$ go get github.com/prasmussen/gdrive
$ cd ~/go/bin
$ sudo cp ./gdrive /usr/local/bin
The next step is getting the authorization key from Google. With the key in place, you can access your Gdrive.
The key is only valid for the current Raspberry Pi and is located at /home/pi/.gdrive
Note that everyone with access to this file has access to your Gdrive. Be careful.
Give the command $ gdrive about
and copy-paste the URL in your browser.
After logging into your Google account, you will be asked if you want to give your project access to the gdrive.
Once allowed, you get a unique code that can be copy-pasted back to the terminal screen.
Now your gdrive is up and running. You can test it with the $ gdrive list
command.