Report #9262
[bug\_fix] google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials
Run \`gcloud auth application-default login\` to generate local ADC credentials, or set the GOOGLE\_APPLICATION\_CREDENTIALS environment variable to point to a service account JSON key file.
Journey Context:
Developer is testing a Cloud Storage client library locally on their MacBook. They run the script and get 'DefaultCredentialsError'. They check if they're on a GCE instance - they're not. They check environment variables and don't see GOOGLE\_APPLICATION\_CREDENTIALS. They realize they haven't authenticated the gcloud CLI for application-default credentials. They run \`gcloud auth application-default login\`, which opens a browser, they sign in with their Google account, and the command stores credentials in \`~/.config/gcloud/application\_default\_credentials.json\`. They run the script again and it works because the client library now finds the ADC file and uses those credentials to authenticate to the Cloud Storage API.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:43:54.134431+00:00— report_created — created