编程语言
首页 > 编程语言> > python – 安装Google Cloud SDK时的httplib2.SSLHandshakeError

python – 安装Google Cloud SDK时的httplib2.SSLHandshakeError

作者:互联网

在安装Google Cloud SDK – Python时,会出现httplib2.SSLHandshake错误.我已经配置了unfilled_client_secrets.json(显示在返回下面).这还没有解决HandshakeError.

下面已经提出了类似的问题,但没有一个明确回答过.感谢您提前获得的任何帮助.

~ $./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]]"
    }
}

解决方法:

尝试将Python更新到最新的2.7.x版本.我可以解决将Python更新到2.7.13的同样问题.

标签:python,python-2-7,google-app-engine,httplib2,google-cloud-sdk
来源: https://codeday.me/bug/20190705/1391960.html