You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Can you please assist????
I am trying to use this plugin using docker. For some reason I don't seem to be able to get my python code to authenticate with GCP.
I keep getting the following error message:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/boto/storage_uri.py", line 569, in create_bucket
conn = self.connect()
File "/usr/local/lib/python2.7/dist-packages/boto/storage_uri.py", line 140, in connect
**connection_args)
File "/usr/local/lib/python2.7/dist-packages/boto/gs/connection.py", line 47, in init
suppress_consec_slashes=suppress_consec_slashes)
File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 194, in init
validate_certs=validate_certs, profile_name=profile_name)
File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 569, in init
host, config, self.provider, self._required_auth_capability())
File "/usr/local/lib/python2.7/dist-packages/boto/auth.py", line 1021, in get_auth_handler
'Check your credentials' % (len(names), str(names)))
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'OAuth2ServiceAccountAuth', 'HmacAuthV1Handler'] Check your credentials
Steps:
python
import boto
import gcs_oauth2_boto_plugin
OAUTH2_CLIENT_ID = 'client_id'
OAUTH2_CLIENT_SECRET = 'client_secret'
gcs_oauth2_boto_plugin.SetFallbackClientIdAndSecret(OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET)
project_id='project_id' //I have my project id
header_values = {"x-goog-project-id": project_id}
uri = boto.storage_uri('my-bucket', 'gs')
uri.create_bucket()
The text was updated successfully, but these errors were encountered:
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'OAuth2ServiceAccountAuth', 'HmacAuthV1Handler'] Check your credentials
In my case the problem was that I had added client_id and client_secret to the [OAuth2] section of ~/.boto but had not run gsutil config which adds gs_oauth2_refresh_token to the [Credentials] section. After running gsutil config and granting access via the OAuth prompt the error was resolved for me.
Hi,
Can you please assist????
I am trying to use this plugin using docker. For some reason I don't seem to be able to get my python code to authenticate with GCP.
I keep getting the following error message:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/boto/storage_uri.py", line 569, in create_bucket
conn = self.connect()
File "/usr/local/lib/python2.7/dist-packages/boto/storage_uri.py", line 140, in connect
**connection_args)
File "/usr/local/lib/python2.7/dist-packages/boto/gs/connection.py", line 47, in init
suppress_consec_slashes=suppress_consec_slashes)
File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 194, in init
validate_certs=validate_certs, profile_name=profile_name)
File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 569, in init
host, config, self.provider, self._required_auth_capability())
File "/usr/local/lib/python2.7/dist-packages/boto/auth.py", line 1021, in get_auth_handler
'Check your credentials' % (len(names), str(names)))
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'OAuth2ServiceAccountAuth', 'HmacAuthV1Handler'] Check your credentials
Steps:
The text was updated successfully, but these errors were encountered: