Hi all, does anyone have experience using Kedro wi...
# questions
c
Hi all, does anyone have experience using Kedro with GCS? My user is able to use
gsutil
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
Copy code
my_gcp_credentials:
  client_id: <REDACTED>
  client_secret: <REDACTED>
  refresh_token: <REDACTED>
  type: <REDACTED>
which was obtained using
Copy code
gcloud auth login
gcloud auth application-default login
and copying the contents of the resulting json
m
When you’re using application default credentials, then you shouldn’t copy-paste into Kedro credentials directly, it’s better to set
GOOGLE_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.
K 2
👍 2