From 9d1d852376536520ad20c6a126d390adc584ec87 Mon Sep 17 00:00:00 2001 From: tripLr Date: Sat, 9 Feb 2019 10:45:43 -0800 Subject: [PATCH 1/3] Create TUTORIAL-INSTALL-Windows This file in process of edit, commits welcome --- TUTORIAL-INSTALL-Windows | 105 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 TUTORIAL-INSTALL-Windows diff --git a/TUTORIAL-INSTALL-Windows b/TUTORIAL-INSTALL-Windows new file mode 100644 index 00000000..3023964d --- /dev/null +++ b/TUTORIAL-INSTALL-Windows @@ -0,0 +1,105 @@ +Source Document, https://github.com/prasmussen/gdrive/issues/426 +Thanks TA40 + +Since using this tool, and compiling from source above, I have noticed a couple issues. +1. tool is pretty useful for uploading compiled binaries to my google drive developer account +2. not being maintained +3. lots of contributions including this tutorial on installing for your own API needed for tool to be effective +4. I am willing to maintain it. + +summary of issues below without pictures, copy and pasted from above issue + +thanks tripLr + +Notes, : if you are compiling this tool, you are using a developer API from someone else, and may/will get errors +This tutorial will help you compile for your platform README.md is unchanged, other than pointing to this tutorial + +### How to get rid of 403 errors + +Many people get Errors like +`Failed to get file: googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded` +and thanks to LINKIWI [#392 (comment)](https://github.com/prasmussen/gdrive/issues/392#issuecomment-423048518) I found a way to fix it properly. +#### What causes the problem? + +The developer made one API for this program and an Google API can "only" make 10 million requests at a day. That means that too many people use this program and the requests gets full. +#### How much does an own API cost? + +Nothing, Google made them free for everyone. +#### How do I fix it then? + +You have to make an own API, download the programing language go, change the API to your own one and compile it to an .exe. +(And btw. binary editing resulted in errors) +#### Linux install instructions +#### And now step by step: (Windows users ?) + + + 1. Download "go" for windows from https://golang.org/dl/ and install it with standard settings and download Git from https://git-scm.com/downloads and install it with standard settings + + 2. Download the repository as .zip from GitHub and unzip it in a new folder + ![image](https://user-images.githubusercontent.com/46388493/51983299-9a11d680-2498-11e9-81d3-fa6f6e8ddd86.png) + + 3. Log into your Google Account (or create one) and go to the [Google Developer API Website](https://console.developers.google.com/apis/dashboard) (and if needed accept the ToS) + + 4. Click on "Create Project" + ![image](https://user-images.githubusercontent.com/46388493/51983494-14425b00-2499-11e9-83bd-372b88bcda37.png) + + 5. and then click "CREATE" + ![image](https://user-images.githubusercontent.com/46388493/51983553-3e941880-2499-11e9-9e15-cb40db9e5d4f.png) + + 6. Give it a name (in my case "Google CLI TA40") and click "Create" + ![image](https://user-images.githubusercontent.com/46388493/51983662-93d02a00-2499-11e9-91b6-b50ed28e4943.png) + + 7. Now go to [Google Drive API](https://console.developers.google.com/apis/library/drive.googleapis.com) and click "ENABLE" + ![image](https://user-images.githubusercontent.com/46388493/51983741-cbd76d00-2499-11e9-9adb-01a742f6f2ed.png) + + 8. Now on the left side, click "Credentials" + ![image](https://user-images.githubusercontent.com/46388493/51983847-0b9e5480-249a-11e9-8a55-48f1f93e4193.png) + + 9. And click "CREATE CREDENTIAL" + ![image](https://user-images.githubusercontent.com/46388493/51983896-338db800-249a-11e9-92df-5bcf779942dd.png) + + 10. Fill the things like I did and then click on "What credentials do I need?" + ![image](https://user-images.githubusercontent.com/46388493/51983961-66d04700-249a-11e9-9039-d9d15025e31f.png) + + 11. Give it a name (I took the name of the API) + ![image](https://user-images.githubusercontent.com/46388493/51983993-86676f80-249a-11e9-85de-5e3eccd0122d.png) + + 12. Next select your e-mail and then give it a name (I again took the name of the API) + ![image](https://user-images.githubusercontent.com/46388493/51984095-c62e5700-249a-11e9-9cc4-b8e6986b2dfd.png) + + 13. Click on "Download" (A .json file will be downloaded) + ![image](https://user-images.githubusercontent.com/46388493/51984163-f4ac3200-249a-11e9-914a-956b956fc51d.png) + + 14. Open the .json file in the editor of your choice.(Notepad++ prefered) + You should see : + + + * "client_id" which looks like this: `81915486XXXX-XXXX22bh62ql2rbnaqtpds82od4ql976.apps.googleusercontent.com` + + * "client_secret" which are random characters like this: `lnA7ZFg5NEGOMpFhd6e4Pqny` + + + 1. In the unzipped repository open the file names "handlers_drive.go" (via Notepad++) and change these 2 variables to the ones you got in step 14 + ![image](https://user-images.githubusercontent.com/46388493/51984552-f0ccdf80-249b-11e9-9cd3-af6d7550f3e4.png) + and save it + + 2. open CMD and go to the folder where the "handerls_drive.go" is. + First type this: `go get github.com/prasmussen/gdrive` (thanks to mbenlioglu [#426 (comment)](https://github.com/prasmussen/gdrive/issues/426#issuecomment-459046466)) + Now type this: `go build` + Now you should have an .exe which you can use normally + + +You can reset your data by deleting the .gdrive Folder in %appdata% +#### Compiling an Linux/OS X/etc. version of gdrive in Windows: + +Look up your OS here: https://golang.org/doc/install/source#environment +Now do this in cmd: +`SET GOOS=your os` +`SET GOARCH=your arch` +then do `go build` + +EXAMPLE: +`SET GOOS=linux` +`SET GOARCH=amd64` + +Hopefully anyone can translate step 16 (compiling) in linux and/or MacOS, thanks From ebd98e2ba7d8dbb6fe034b252ccd0359a2f88490 Mon Sep 17 00:00:00 2001 From: tripLr Date: Sat, 9 Feb 2019 10:49:49 -0800 Subject: [PATCH 2/3] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4c6b5cd7..bdb2e89f 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,9 @@ If you want to compile from source you need the [go toolchain](http://golang.org Version 1.5 or higher. ## Installation +Warning, compiling from source code may overwhelm API due to number of users usins the same credentials from developer + SEE tutorials for install ! + ### With [Homebrew](http://brew.sh) on Mac ``` brew install gdrive From 164af9c2b61491a01f786420216ecc31d4ce7578 Mon Sep 17 00:00:00 2001 From: tripLr Date: Fri, 1 Mar 2019 09:51:35 -0800 Subject: [PATCH 3/3] Update README.md Work around for api upload errors --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bdb2e89f..682358be 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,21 @@ gdrive ====== -## Note -This tool is not being actively maintained at the moment, ymmv. -For incremental and encrypted backup of unix systems [borg](https://github.com/borgbackup/borg) -is a great alternative and [rsync.net](http://rsync.net/products/attic.html) provides -a cheap and reliable backup target. +## Note maintenance ! +This tool is not being actively maintained at the moment, by the original developer github.com/prasmussen +I have forked his repo, to further foster interest in this tool. +My android build team use this extensivly to upload our android builds to our developer google drive accounts. + +Please pull request any guides and work arounds. + +## Warning, API errors while uploading is being flooded due to the popular use ! +work arounds +/bin/bash work around +Credit github.com/ripee + +while ! gdrive upload --parent ; do sleep 1; done + +Will post examples next ## Overview gdrive is a command line utility for interacting with Google Drive.