Gdrive

From NovaOrdis Knowledge Base
Revision as of 16:48, 2 November 2016 by Ovidiu (talk | contribs) (→‎Authentication)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

Overview

Authentication

Upon the first usage, gdrive gets an authentication link from Google Drive:

./gdrive upload --parent ... some-file.txt
Authentication needed
Go to the following url in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=...&redirect_uri=...&response_type=code&scope=...&state=state

Enter verification code: 

The link must be used from a browser to provide authentication and enable gdrive to manage files:

Gdrive.png

Upon approval, Google Drive provide an authentication code, which should be passed to gdrive.

The authentication code is cached locally. For how long and where?

Usage

Upload File

gdrive upload --parent 0B3X9GlR6EmbnY1RLVTk5VUtOVkk gdrive-osx-x64

This is how you find the file/folder ID.

Download File

$ gdrive download 0B3X9GlR6EmbnZ1NGS25FdEVlWEk

This is how you find the file/folder ID.