Google Cloud: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started
The Google client library found no Application Default Credentials (ADC) on this machine or environment.
Could not load the default credentialsYour default credentials were not found Meaning
Locally you need gcloud auth application-default login (or GOOGLE_APPLICATION_CREDENTIALS pointing to a key file). On Google Cloud the attached service account is used automatically — outside GCP (other hosts, CI) you must provide credentials (workload identity federation preferred).
Common causes
- Local machine without gcloud ADC login
- GOOGLE_APPLICATION_CREDENTIALS unset or pointing to a missing file
- Running outside GCP without credentials
- Container missing the mounted key/metadata access
⚡ Quick fix
- gcloud auth application-default login (local)
- Use workload identity federation in CI
- On GCP, attach a service account with the needed roles
Detailed fix by platform
Shell
- bash
gcloud auth application-default login export GOOGLE_APPLICATION_CREDENTIALS=/secrets/sa.json # only if you must use a key
How to diagnose
- Environment — Local, GCP or other?
- Variable — GOOGLE_APPLICATION_CREDENTIALS
- Identity — gcloud auth list
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Google Cloud / Firebase
- Secret Manager: Permission secretmanager.versions.access denied Secret Manager: 7 PERMISSION_DENIED: Permission 'secretmanager.versions.access' denied for resource 'projects/123/secrets/db-pass/versions/latest'
- 409: The resource already exists Compute Engine: ERROR: (gcloud.compute.instances.create) Could not fetch resource: The resource 'projects/p/zones/z/instances/vm-1' already exists
- BigQuery: Unrecognized name BigQuery: Syntax error / Unrecognized name: customer_id at [3:8] (Did you mean customerId?)
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026