Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

httplib2.SSLHandshakeError while Installing Google Cloud SDK

While installing the Google Cloud SDK - Python, a httplib2.SSLHandshakeError keeps occuring. I have configured the unfilled_client_secrets.json (shown below the return). And this has not solved the HandshakeError.

Similar questions have been asked on here below, but none have been explicitly answered. Thank you, in advance for any help you might be able to provide.

~ $ ./google-cloud-sdk/install.sh Welcome to the Google Cloud SDK!

Traceback (most recent call last):
File "/Users/rptrainor/./google-cloud-sdk/bin/bootstrapping/install.py", line 206, in main()
File "/Users/rptrainor/./google-cloud-sdk/bin/bootstrapping/install.py", line 184, in main Install(pargs.override_components, pargs.additional_components)
File "/Users/rptrainor/./google-cloud-sdk/bin/bootstrapping/install.py", line 130, in Install _CLI.Execute(['--quiet', 'components', 'list'])
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 759, in Execute self._HandleAllErrors(exc, command_path_string, specified_arg_names)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 737, in Execute resources = args.calliope_command.Run(cli=self, args=args)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 741, in Run display_info=self.ai.display_info).Display()
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/display.py", line 427, in Display self._printer.Print(self._resources)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_printer_base.py", line 251, in Print for resource in resources:
File "/Users/rptrainor/google-cloud-sdk/lib/surface/components/list.py", line 86, in Run result = update_manager.List()
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 516, in List _, diff = self._GetStateAndDiff(command_path='components.list')
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 446, in _GetStateAndDiff command_path=command_path)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 429, in _GetLatestSnapshot *effective_url.split(','), command_path=command_path)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/snapshots.py", line 165, in FromURLs for url in urls]
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/snapshots.py", line 186, in _DictFromURL response = installers.ComponentInstaller.MakeRequest(url, command_path)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/installers.py", line 283, in MakeRequest return url_opener.urlopen(req, timeout=timeout)
File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/url_opener.py", line 69, in urlopen return opener.open(req, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/url_opener.py", line 54, in https_open return self.do_open(build, req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1181, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 995, in request self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1029, in _send_request self.endheaders(body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 991, in endheaders self._send_output(message_body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in _send_output self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 806, in send self.connect()
File "/Users/rptrainor/google-cloud-sdk/lib/third_party/httplib2/init.py", line 1081, in connect raise SSLHandshakeError(e)

httplib2.SSLHandshakeError: [Errno 1] _ssl.c:510: error:14090086:SSL >routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

{
  "web":{
    "client_id":"[[CLIENT_ID_IS_HERE]]",
    "project_id":"[[PROJECT_ID_IS_HERE]]",
    "auth_uri":"https://accounts.google.com/o/oauth2/auth",
    "token_uri":"https://accounts.google.com/o/oauth2/token",
        "auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
    "client_secret":"[[CLIENT_SECRET_IS_HERE]]"
    }
}
like image 283
Ryan Trainor Avatar asked Oct 18 '22 15:10

Ryan Trainor


1 Answers

Try updating Python to the last 2.7.x version. I could resolve the very same issue updating Python to 2.7.13.

like image 106
Hernán Acosta Avatar answered Oct 20 '22 10:10

Hernán Acosta