-
Notifications
You must be signed in to change notification settings - Fork 154
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
Avoid Authentication When Connecting to Storage Emulator #324
Comments
@stefanadelbert For now i think you can use a class method from google.cloud import storage
client = storage.Client.create_anonymous_client()
client. project = 'project_name'
print (list(client.list_buckets())) python-storage/google/cloud/storage/client.py Lines 142 to 155 in 6a0b8a7
|
Is this issue abandoned? It's quite annoying that you can't simply initiate the storage client if you ever intend to run tests.
You always have to write some kind of wrapper like this.
|
Problem
When connecting to a 3rd party storage emulator, like
gcloud-storage-emulator
, authentication is required. This requires injecting credentials into containers and adding conditional logic in code to authenticate when running against emulators.Solution
When
STORAGE_EMULATOR_HOST
is set, use an insecure connection, as is done forfirestore
.The text was updated successfully, but these errors were encountered: