Gdrive: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=External= * https://github.com/prasmussen/gdrive =Overview=") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=Overview= | =Overview= | ||
=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. | |||
The authentication code is cached locally. <font color=red>For how long and where?</font> | |||
=Usage= | |||
==Upload File== | |||
<pre> | |||
gdrive upload --parent 0B3X9GlR6EmbnY1RLVTk5VUtOVkk gdrive-osx-x64 | |||
</pre> | |||
This is how you [[Google_Drive#Obtain_File.2FFolder_ID|find the file/folder ID]]. | |||
==Download File== | |||
<pre> | |||
$ gdrive download 0B3X9GlR6EmbnZ1NGS25FdEVlWEk | |||
</pre> | |||
This is how you [[Google_Drive#Obtain_File.2FFolder_ID|find the file/folder ID]]. |
Latest revision as of 16:48, 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:
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.