

- #GOOGLE DRIVE INSTALL COMMAND LINE HOW TO#
- #GOOGLE DRIVE INSTALL COMMAND LINE UPDATE#
- #GOOGLE DRIVE INSTALL COMMAND LINE SOFTWARE#
- #GOOGLE DRIVE INSTALL COMMAND LINE CODE#
We can now compile gDrive to our device by running the following command. We now need to run the following command so that the Go compiler retrieves all the additional packages that we require to compile our modified version of gDrive. With the changes made, save the file by pressing CTRL + X, followed by Y, then ENTER.ħ. Replace With Your own Client Secret const ClientSecret = "YOURCLIENTSECRET"Ħ.

Replace With Your own Client ID const ClientId = "YOURCLIENTID"įind const ClientSecret = "1qsNodXNaWq1mQuBjUjmvhoO" You should have both the client id and client secret from the previous section.įind const ClientId = "" In this file, find the following lines and replace them with their required data. Our next job is to replace the client secret and client id defined in the code.īegin this process by changing into the cloned directory and modifying the “ handlers_meta.go” file using nano. With git installed to your device, run the following command to clone the gdrive code. Now, all we need to do is to run the following command.
#GOOGLE DRIVE INSTALL COMMAND LINE UPDATE#
Before we install git, we need to first update the package list by running the command below.
#GOOGLE DRIVE INSTALL COMMAND LINE SOFTWARE#
You can download the software from the official Git website, or follow the steps below for Debian based system such as Ubuntu and Raspbian.ġ.
#GOOGLE DRIVE INSTALL COMMAND LINE CODE#
To compile gDrive, we will need to get its source code by using git.īefore we do this, we should first install git to our device. Compiling gDrive with your API Credentials For our example, we will be using the name “ gDrive-pimylifeup“.Ĭopy both of these values down as you will need them later on in this tutorial. On this page, you need to enter a name for your project ( 1.). Begin by going to the “ Create Project Page” in the Google Developer Console. source ~/.bashrc Retrieving your Google Drive API Credentialsīefore we proceed to compile the gDrive software we need to retrieve your Google Drive API Credentials.ġ. To load in the changes to the bashrc file without having to restart, run the following command. Now save the file by pressing CTRL + X followed by Y then ENTER.Ħ. export GOPATH=$HOME/goĮxport PATH=/usr/local/go/bin:$PATH:$GOPATH/binĥ. These two lines will allow us to run the compiler straight from the command line without having to reference its path directly.

To the bottom of this file, add the following two lines. This file is automatically executed by Bash and will load in our new paths. We can do this by modifying the bash aliases file. Our next step is to get the terminal to interact with Go. Run the following command on your device. With the Go binaries downloaded, we need to now extract it to the /usr/local/ directory. Linux ARMv6 (Use this for a Raspberry Pi) wget -O go.tar.gzĢ. These wget commands differ depending on what architecture you are using. On the terminal on your Linux system, run one of the following commands. However, if you are doing this tutorial on a Linux based system like Raspbian, the steps get a bit more involved.

If you are doing this on a Windows or macOS device, then you can grab the relevant installers from the Golang website.ġ. Setting up the Go Compilerīefore we can compile the gDrive software on our device, we must first install the Go compiler.
#GOOGLE DRIVE INSTALL COMMAND LINE HOW TO#
This guide will show you how to compile the gDrive software for the Raspberry Pi using your own Google credentials.Įven though this guide focuses on the Raspberry Pi, you can compile gDrive for most operating systems by following the same steps.īy using your own Google credentials, you will be less likely to run into errors like “ Sign in with Google temporarily disabled for this app“. It is relatively simple to use once you have it set up on your device. GDrive is a handy tool for uploading files to Google Drive through the command line.
