Gdrive: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


=Authentication=
=Authentication=
Upon the first usage, gdrive gets an authentication link from Google Drive:
<pre>
./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:
</pre>
The link must be used from a browser to provide authentication and enable gdrive to manage files:
[[Image:gdrive.png]]
Upon approval, Google Drive provide an authentication code, which should be passed to gdrive.


=Usage=
=Usage=

Revision as of 16:46, 2 November 2016

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.

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.