Chew Lee
03/20/2023, 8:11 AMgsutil
to read and write files to the bucket. Kedro run also successfully reads/writes files from/to GCS. But when trying to load a dataset from the Catalog in jupyter notebook, I get a 401 access denied.
I have a credentials.yml file set up with
my_gcp_credentials:
client_id: <REDACTED>
client_secret: <REDACTED>
refresh_token: <REDACTED>
type: <REDACTED>
which was obtained using
gcloud auth login
gcloud auth application-default login
and copying the contents of the resulting jsonmarrrcin
03/20/2023, 8:27 AMGOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of the ADC json, which is usually $HOME/.config/gcloud/application_default_credentials.json
See: https://cloud.google.com/docs/authentication/application-default-credentials
Btw, if you’re using ADC, then it should also work without explicit credentials set in Kedro, as Google’s auth libraries used by the underlying gcsfs
should automatically perform the resolving which credentials to use as described in the linked page.