-
Notifications
You must be signed in to change notification settings - Fork 397
gdrive: add gdrive_user_credentials_file description #1192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
afdf91f
339c134
2db7cb9
90c8ea4
5869c06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -194,19 +194,43 @@ authentication is needed. | |||||||||||||||||
On the first usage of a GDrive [remote](/doc/command-reference/remote), for | ||||||||||||||||||
example when trying to `dvc push` for the first time after adding the remote | ||||||||||||||||||
with a [valid URL](#url-format), DVC will prompt you to visit a special Google | ||||||||||||||||||
authorization web page. There you'll need to sign into your Google account. The | ||||||||||||||||||
authentication web page. There you'll need to sign into your Google account. The | ||||||||||||||||||
[auth process](https://developers.google.com/drive/api/v2/about-auth) will ask | ||||||||||||||||||
you to grant DVC the necessary permissions, and produce a verification code | ||||||||||||||||||
needed for DVC to complete the connection. On success, the necessary credentials | ||||||||||||||||||
will be saved in a Git-ignored file, located in | ||||||||||||||||||
`.dvc/tmp/gdrive-user-credentials.json`. | ||||||||||||||||||
`.dvc/tmp/gdrive-user-credentials.json` and they will be used automatically next | ||||||||||||||||||
time you run DVC. | ||||||||||||||||||
Comment on lines
+202
to
+203
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not exactly true, they can be used for multiple remotes if you don't specify an option gdrive_user_credentials_file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. But "run DVC" doesn't sound exact either. How about
Suggested change
Maybe even continue this paragraph with the explanation about how to overwrite it, instead of a separate paragraph that repeats the file name. |
||||||||||||||||||
|
||||||||||||||||||
⚠️ In order to prevent unauthorized access to your Google Drive, **do not share | ||||||||||||||||||
these credentials with others**. Each team member should go through this process | ||||||||||||||||||
individually. | ||||||||||||||||||
|
||||||||||||||||||
If you use multiple GDrive remotes, by default they will be sharing the same | ||||||||||||||||||
`.dvc/tmp/gdrive-user-credentials.json` credentials file. It can be overridden | ||||||||||||||||||
Comment on lines
+209
to
+210
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we don't need to repeat the file name since it's mentioned in in the previous paragraph (before the warning). |
||||||||||||||||||
with the `gdrive_user_credentials_file` setting: | ||||||||||||||||||
|
||||||||||||||||||
```dvc | ||||||||||||||||||
$ dvc remote modify myremote gdrive_user_credentials_file \ | ||||||||||||||||||
.dvc/tmp/myremote-credentials.json | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
> If you edit the config file manually, value must be either an absolute path or | ||||||||||||||||||
> a path **relative to the config file location**. | ||||||||||||||||||
|
||||||||||||||||||
⚠️ In order to prevent unauthorized access to your Google Drive, **never | ||||||||||||||||||
commit** this file with Git. Instead, add it into `.gitignore` and never share | ||||||||||||||||||
it with other people. | ||||||||||||||||||
|
||||||||||||||||||
If you wish to change the user you have authenticated with, or for | ||||||||||||||||||
troubleshooting misc. token errors, simply remove the user credentials JSON file | ||||||||||||||||||
and authorize again. | ||||||||||||||||||
|
||||||||||||||||||
Alternatively, a `GDRIVE_CREDENTIALS_DATA` can be set to pass user credentials | ||||||||||||||||||
in CI/CD systems, production setup, read-only file systems, etc. Content of this | ||||||||||||||||||
variable should be a string with JSON that has the same format as in the | ||||||||||||||||||
credentials files described above and usually you get it going through the same | ||||||||||||||||||
authentication process. DVC reads this variable first, before the credentials | ||||||||||||||||||
file. | ||||||||||||||||||
shcheklein marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
|
||||||||||||||||||
> Please note our [Privacy Policy (Google APIs)](/doc/user-guide/privacy). |
Uh oh!
There was an error while loading. Please reload this page.