-
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.
It is already installed. Please continue with the Google authorization.
If you want to install Gdrive on another RPi, follow the steps below.
Start with the installation of Rust.
$ curl https://sh.rustup.rs -sSf | sh
Select the default option 1 and once completed, check the installation.
$ rustc –version
$ cargo –version
The next step is building gdrive.
Start by checking the size of swap memory ($ free -m
). It needs to be 2 GByte or more.
If required, enlarge the space by the the following commands.
$ sudo nano /etc/dphys-swapfile
# set CONF_SWAPSIZE=2048
# save with <Ctrl><X>, <Y>, <Enter>
Now, with sufficient memory available, build the gdrive executable.
$ git clone https://github.com/glotlabs/gdrive.git
$ cd ~/gdrive
$ cargo build --release
$ 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 will be stored at /home/pi/.config/gdrive3
Note that everyone with access to this file has access to your Gdrive. Be careful.
👉The whole procedure involves many steps. Follow the guide carefully.
1 Start with making a new project in Google Cloud Console.
Or
Wait a few second until the project is created by Google.
The first email address is always your Gmail. Other addresses are not possible.
The second one can be any valid email address. Google notifies you when the project changes.
If you want, you can upload a logo, it's not required.
Click menu item Credentials
- Create credentials
- OAuth client ID
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.