Report #80057
[bug\_fix] GCP Application Default Credentials \(ADC\) not found
Run \`gcloud auth application-default login\` to generate the \`application\_default\_credentials.json\` file in \`~/.config/gcloud/\`, or set the \`GOOGLE\_APPLICATION\_CREDENTIALS\` environment variable to a service account key file. The Google Cloud client libraries search for ADC in a specific hierarchy; without this file or env var, the auth chain fails.
Journey Context:
Developer clones a Python project using \`google-cloud-storage\` and runs it locally. It immediately raises \`google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials\`. The developer checks \`gcloud auth list\` and sees they are logged in, confusing them. They try \`gcloud config list\` which shows a valid project. They search the error and learn that \`gcloud auth login\` \(for CLI commands\) is separate from Application Default Credentials \(for client libraries\). They run \`gcloud auth application-default login\`, which opens a browser, obtains an OAuth 2.0 refresh token, and writes it to \`~/.config/gcloud/application\_default\_credentials.json\`. The script now works because the \`google.auth.default\(\)\` function successfully loads the ADC.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:58:43.360753+00:00— report_created — created