What is the correct way to use Github secrets with Google Drive key (json file)?
We are getting the following error:
ERROR: failed to pull data from the cloud - To use service account, set gdrive_service_account_json_file_path, and optionallygdrive_service_account_user_email in DVC config
You can create a repository secret with the contents of the .dvc/tmp/gdrive-user-credentials.json file that DVC is going to generate locally after the first successful authentication.
Then, you can expose it on your workflow by using the following environment variable, as suggested in the documentation:
Can you please confirm that the GDRIVE_CREDENTIALS_DATA variable has been populated with the contents of the .dvc/tmp/gdrive-user-credentials.json file and not with the contents of the service account JSON file issued by Google Cloud Platform?
If this doesn’t solve your issue, can you please post the output of dvc doctor and dvc pull --verbose --remote myremote?
On our first attempt we added the content from the json directly extracted from Google Coud Platform. Then we did exactly what was mentioned in documentation and updated the secret with the content of the local file (.dvc/tmp/gdrive-user-credentials.json).
The error it gave was always the same.
Can you please attach a copy of the error message, preferebly when running your dvc commands with the --verbose option?
What did you intend to achieve with this command? DVC should automatically pick the credential file contents from the GDRIVE_CREDENTIALS_DATA environment variable.
Can you please try to run the workflow after commenting out this line?
Please keep in mind that the vast majority of Linux distributions rely on case-sensitive filesystems: a file named requirements.txt can’t be accessed with any other case combination, like Requirements.txt as in your answer.
Can you please check if this file begins with an uppercase letter as in your message?
If you use our containers or the iterative/setup-dvc@v1 action, you shouldn’t need/want to install DVC manually to your Python environment. We ship them with all the backends, including [gdrive] for convenience.
Again, it looks like data/Documents is not the same as data/documents due to case sensitivity.
Sorry, I noticed your message after posting the same. As you guessed, everything is case sensitive in almost every sane Linux system: even if you’re accustomed to work in case-insensitive filesystems locally, you always try to take that into account for portability.
Note: I had to consolidate all my messages in a single place because new users can’t post more than three consecutive replies.
Stupid problem with capitalization. We changed the filename to lowercase assuming it would be sent with git push, but in reality no changes were detected. Because the change was made together with several others, we didn’t notice…
It’s working!