Using DVC in github codespaces

I’m trying to use dvc in a github codespace and gdrive remote storage. However once I try to “dvc push”
I get this error

Hi @mouadAqsone ! I haven’t looked in depth, but looks like the authorization method we use for GDrive remotes (GitHub - iterative/PyDrive2: Google Drive API Python wrapper library. Maintained fork of PyDrive.) doesn’t work inside a GitHub codespace.

As a workaround, I would suggest that you run a first-time dvc push on your local machine. This would create a credentials files in that local machine (How to Setup a Google Drive DVC Remote) and you could use Codespaces secrets (Managing encrypted secrets for your codespaces - GitHub Docs) to expose the contents of that file as an environment variable (GDRIVE_CREDENTIALS_DATA) .

I think that would make dvc push work inside the codespace

2 Likes