Skip to content

[SSL: CERTIFICATE_VERIFY_FAILED] Mac OS #240

Closed

Description

@jackton1
Output: 
    {'User-Agent': 'nodeenv/1.3.3 (https://github.com/ekalinin/nodeenv/)'}
    
Errors: 
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
        encode_chunked=req.has_header('Transfer-encoding'))
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
        self.send(msg)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
        self.connect()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect
        server_hostname=server_hostname)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket
        _context=self, _session=session)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in __init__
        self.do_handshake()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake
        self._sslobj.do_handshake()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

Activity

  1. ekalinin commented on Aug 2, 2019

    @ekalinin
    Owner

    Hey,

    Could you show original command?

  2. jackton1 commented on Aug 2, 2019

    @jackton1
    Author

    Sure.

    This happened while using prettier's pre-commit hook on mac OS with virtaulenv activated

    - repo: https://github.com/prettier/prettier
      sha: 1.18.2
      hooks:
        - id: prettier
  3. jackton1 commented on Aug 29, 2019

    @jackton1
    Author

    Also occurs when running nodeenv env

    $ nodeenv env
    
    {'User-Agent': 'nodeenv/1.3.3 (https://github.com/ekalinin/nodeenv/)'}
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
        encode_chunked=req.has_header('Transfer-encoding'))
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
        self.send(msg)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
        self.connect()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect
        server_hostname=server_hostname)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket
        _context=self, _session=session)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in __init__
        self.do_handshake()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake
        self._sslobj.do_handshake()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)
    
    During handling of the above exception, another exception occurred:
    
  4. jackton1 commented on Aug 30, 2019

    @jackton1
    Author

    For any one that encounters this issue

    $ pip install certifi
    $ python3.6 -m certifi
    /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/certifi/cacert.pem
    $ cd /Library/Frameworks/Python.framework/Versions/3.6/etc/openssl/
    $ ln -s /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.7/site-packages/certifi/cacert.pem cert.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions