Intermittent DefaultCredentialsError on GCE
See original GitHub issueOriginal issue: https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4358
After successful use of credentials, _ = google.auth.default()
, an application crashes when credentials cannot be detected:
...
File "/usr/local/lib/python2.7/dist-packages/google/cloud/client.py", line 212, in __init__
Client.__init__(self, credentials=credentials, _http=_http)
File "/usr/local/lib/python2.7/dist-packages/google/cloud/client.py", line 125, in __init__
credentials, _ = google.auth.default()
File "/usr/local/lib/python2.7/dist-packages/google/auth/_default.py", line 286, in default
raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or
explicitly create credential and re-run the application. For more
information, please see
https://developers.google.com/accounts/docs/application-default-credentials.
/cc @dmho418
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:23 (11 by maintainers)
Top Results From Across the Web
DefaultCredentialsError when trying to collect Google default ...
I am attempting to upload a file to a Google cloud storage bucket from a service running on a Kubernetes pod. This requires...
Read more >Re: Could not automatically determine credentials.
DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create ...
Read more >How Application Default Credentials works | Authentication
ADC searches for credentials in the following locations: GOOGLE_APPLICATION_CREDENTIALS environment variable; User credentials set up with the Google Cloud CLI ...
Read more >DefaultCredentialsError with GKE cluster (intermittently) issue
DefaultCredentialsError with GKE cluster (intermittently) ... --format=json cmd-path: /usr/lib/google-cloud-sdk/bin/gcloud expiry: "2019-11-05T22:55:03Z" ...
Read more >Service Account Authentication via Secret Key JSON file (for ...
I need to authenticate with Google Cloud Platform to access ... DefaultCredentialsError: ('File /tmp/creds.json is not a valid json file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would love to see a fix for this issue
I’m still seeing this error fairly regularly running on GAE flex for Python 3.6 with
google-auth==1.6.3
. Here’s the full stack trace: