TritonDataCenter / python-manta

Python SDK for Manta (community maintained)
MIT License
25 stars 18 forks source link

SSL error #48

Closed jimrybarski closed 6 years ago

jimrybarski commented 6 years ago

On a fresh install of python-manta in a new virtualenv, I'm getting this SSL error below. This occurs with the version on PyPI and also the current master branch. There were no errors during installation. I got the environment variables (MANTA_URL, MANTA_KEY_ID, and MANTA_USER) from the Getting Started page on Joyent, and I definitely have the right SSH key.

$ pip freeze
asn1crypto==0.24.0
bcrypt==3.1.4
cffi==1.11.5
cryptography==2.3.1
enum34==1.1.6
httplib2==0.8
idna==2.7
ipaddress==1.0.22
manta==2.6.2
paramiko==2.4.2
pyasn1==0.4.4
pycparser==2.19
pycrypto==2.6
PyNaCl==1.3.0
six==1.11.0
$ python -V
Python 2.7.15rc1

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic
$ mantash
[https://us-east.manta.joyent.com/jimrybarski/stor]$ ls
mantash: ERROR: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726) (/home/jim/code/mantaenv/local/lib/python2.7/site-packages/httplib2/__init__.py:1044 in connect)

Traceback (most recent call last):
  File "/home/jim/code/mantaenv/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/EGG-INFO/scripts/mantash", line 2153, in <module>
    retval = main(sys.argv)
  File "/home/jim/code/mantaenv/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/EGG-INFO/scripts/mantash", line 2147, in main
    return shell.main(argv, loop=cmdln.LOOP_IF_EMPTY)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/cmdln.py", line 268, in main
    return self.cmdloop()
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/cmdln.py", line 358, in cmdloop
    retval = self.onecmd(argv)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/cmdln.py", line 422, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/cmdln.py", line 1125, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/home/jim/code/mantaenv/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/EGG-INFO/scripts/mantash", line 602, in do_ls
    to_print = self._ls_path(path, opts.dir)
  File "/home/jim/code/mantaenv/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/EGG-INFO/scripts/mantash", line 426, in _ls_path
    dirents = self.client.ls(abspath)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/client.py", line 702, in ls
    mdir, marker=marker)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/client.py", line 256, in list_directory2
    res, content = self._request(mdir, "GET", query=query)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/client.py", line 210, in _request
    return http.request(url, method, ubody, headers)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1570, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/manta-2.6.2-py2.7.egg/manta/client.py", line 100, in _request
    res, content = httplib2.Http._request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1317, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1252, in _conn_request
    conn.connect()
  File "/home/jim/code/mantaenv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1044, in connect
    raise SSLHandshakeError(e)
SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)