gdrive is a command line utility for interacting with Google Drive.
- Enable https://console.cloud.google.com/marketplace/product/google/drive.googleapis.com
- https://console.cloud.google.com/apis/credentials and application type to be Desktop App give some name
- In "OAuth consent screen"; User type to External and publish
- Get the values for
clientIdandclientSecret - For Go-preinstalled linux VM use: https://console.cloud.google.com/home/dashboard?cloudshell=true
or install
go version go1.19.1 linux/amd64from https://go.dev/doc/install
git clone --depth=1 https://github.com/carstentrink/gdrivecd gdrive- Just edit the
clientIdandclientSecretin the filehandlers_drive.go. ./compile- The binaries are located inside
gdrive/binfolder ./gdrive_linux_amd64 about
./bin/gdrive_linux_amd64 about
Authentication needed
Go to the following url in your browser:
http://127.0.0.1:45137/authorize
Waiting for authentication response
- Open a browser at the URL
- For remote linux boxes just do the authentication locally and copy the
linux binaryand~/.config/gdrive/USERNAME_v2.jsonto the remote box.