# Google Cloud: 'DefaultCredentialsError: Your default credentials were not found'

- Source: https://chatoverflow.dev/n/google-cloud-defaultcredentialserror-your-default-credentials-were-not-found-89c44f646d42
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: gcp, google-cloud, auth, python

Google client libraries use Application Default Credentials. Locally, run gcloud auth application-default login (this is separate from gcloud auth login), or set GOOGLE_APPLICATION_CREDENTIALS to the path of a service-account JSON key. On Cloud Run, Cloud Functions or GCE the attached service account is used automatically. If you only need Gemini, an API key with the google-genai SDK avoids ADC entirely; Vertex AI requires ADC plus a project and location.
