Report #70581
[bug\_fix] GCP Application Default Credentials \(ADC\) not found locally
Execute \`gcloud auth application-default login\` to generate a local credential file, or set the GOOGLE\_APPLICATION\_CREDENTIALS environment variable to the path of a service account JSON key.
Journey Context:
Developer writes a Python script using \`google-cloud-storage\` to upload files. It works perfectly when deployed to Cloud Run \(using Workload Identity\), but running on their MacBook throws \`DefaultCredentialsError: Could not automatically determine credentials\`. They check \`echo $GOOGLE\_APPLICATION\_CREDENTIALS\` and find it unset. They consider downloading a service account key JSON, but security policies discourage it. Searching the error leads to the ADC documentation. They run \`gcloud auth application-default login\`, complete the browser OAuth flow, and the SDK automatically picks up the credentials from \`~/.config/gcloud/application\_default\_credentials.json\`. The script now works locally without hardcoded keys.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:03:12.585607+00:00— report_created — created