Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

check and use ~/.gdrive/credentials.json #476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ppbrown
Copy link

@ppbrown ppbrown commented Jul 12, 2019

I tested this and it seems to work.

If a user has created their own project, and generated creds for it, and downloaded credentials.json ...
they can save it in ~/.gdrive/credentials.json, and gdrive will now open it and use the clientid and secret from it.

@rohfle
Copy link

rohfle commented Jul 13, 2019

Yeah this is much much simpler than the pull request I wrote.

Can you add some documentation to the README? Feel free to base it on the docs in 4916e16

@ppbrown
Copy link
Author

ppbrown commented Jul 13, 2019

If this is accepted, I'll then put in some effort for more docs ;)

@SaitouToshihide
Copy link

Has there been any progress?

(This feature had been very helpful when I encountered "Provided id is not a sync root directory" while syncing multiple machines.)

@caryyu
Copy link

caryyu commented Jun 28, 2020

I forked to my repo and merged this PR, it works like a charm, thanks a lot for sharing this.

BTW:

~/.gdrive/credentials.json from Google API Console Credentials where you need to create an OAuth-kind-credential and choose Desktop Application for it, and then just simply download the JSON file to the location, the raw file name should be something like client_secret_744022377843-8sodljr9k1eupkn7ok257kj6d5q0ltpq.apps.googleusercontent.com.json

If this PR still doesn't get merged you can try to install my repo as below:

go get -u github.com/caryyu/gdrive
go install github.com/caryyu/gdrive

then, open a new terminal window(make sure GOBIN/GOPATH is configured in your bash/zsh profile) and put your downloaded json-file to ~/.gdrive/credentials.json and try the command below:

gdrive about

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants