Google Cloud Storage
Start with dvc remote add
to define the remote. Set a name and a valid Google
Cloud Storage URL:
$ dvc remote add -d myremote gs://<mybucket>/<path>
<mybucket>
- name of an existing storage bucket<path>
- optional path to a folder in your bucket
Upon dvc push
(or when needed), DVC will try to authenticate using your
gcloud CLI authorization. This reads the default GCP key file.
Make sure to run gcloud auth application-default login unless you use a service account or other ways to authenticate (more info).
To use custom auth or further configure your DVC
remote, set any supported config param with dvc remote modify
.
Custom authentication
For service accounts (a Google account associated to your GCP project instead of a user), you can set the path to the file that contains a service account key:
$ dvc remote modify --local myremote \
credentialpath 'path/to/project-XXX.json'