Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STORAGE_EMULATOR_HOST should not necessitate GOOGLE_APPLICATION_CREDENTIALS #9453

Closed
jeanbza opened this issue Oct 11, 2019 · 0 comments · Fixed by #9455
Closed

STORAGE_EMULATOR_HOST should not necessitate GOOGLE_APPLICATION_CREDENTIALS #9453

jeanbza opened this issue Oct 11, 2019 · 0 comments · Fixed by #9455
Assignees
Labels
api: storage Issues related to the Cloud Storage API. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jeanbza
Copy link
Member

jeanbza commented Oct 11, 2019

When I run storage with STORAGE_EMULATOR_HOST, I should not need to provide GOOGLE_APPLICATION_CREDENTIALS since I'm talking to an unsecured emulator. However, I get:

deklerk at deklerk-macbookpro2 in ~/workspace/google-cloud-python/storage/tests/perf on master
$ unset GOOGLE_APPLICATION_CREDENTIALS
deklerk at deklerk-macbookpro2 in ~/workspace/google-cloud-python/storage/tests/perf on master
$ python3 benchwrapper.py --port 8081
Traceback (most recent call last):
  File "benchwrapper.py", line 27, in <module>
    client = storage.Client()
  File "/Users/deklerk/workspace/google-cloud-python/storage/google/cloud/storage/client.py", line 94, in __init__
    project=project, credentials=credentials, _http=_http
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/cloud/client.py", line 226, in __init__
    _ClientProjectMixin.__init__(self, project=project)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/cloud/client.py", line 178, in __init__
    project = self._determine_default(project)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/cloud/client.py", line 193, in _determine_default
    return _determine_default_project(project)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/cloud/_helpers.py", line 186, in _determine_default_project
    _, project = google.auth.default()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/auth/_default.py", line 317, in default
    raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://cloud.google.com/docs/authentication/getting-started
@HemangChothani HemangChothani self-assigned this Oct 11, 2019
@HemangChothani HemangChothani added api: storage Issues related to the Cloud Storage API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 11, 2019
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
3 participants