ekalinin / nodeenv

Virtual environment for Node.js & integrator with virtualenv
http://ekalinin.github.io/nodeenv/
Other
1.71k stars 212 forks source link

[CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate #370

Open tin-ot opened 1 month ago

tin-ot commented 1 month ago

nodeenv --version 1.9.1

python -V Python 3.12.3

pip install certifi --force Successfully installed certifi-2024.8.30

sudo apt update sudo update-ca-certificates

ln -s /etc/ssl/certs/ca-certificates.crt "$VIRTUAL_ENV/lib/python3.12/site-packages/certifi/cacert.pem" -f

Traceback (most recent call last): File "/home/bob/venv/bin/nodeenv", line 8, in sys.exit(main()) ^^^^^^ File "/home/bob/venv/src/nodeenv/nodeenv.py", line 1139, in main args.node = get_last_stable_node_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bob/venv/src/nodeenv/nodeenv.py", line 1073, in get_last_stable_node_version return _get_last_node_version() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bob/venv/src/nodeenv/nodeenv.py", line 1066, in _get_last_node_version for v in _get_versions_json() if version_filter(v)), None) ^^^^^^^^^^^^^^^^^^^^ File "/home/bob/venv/src/nodeenv/nodeenv.py", line 1028, in _get_versions_json response = urlopen('%s/index.json' % src_base_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bob/venv/src/nodeenv/nodeenv.py", line 652, in urlopen return urllib2.urlopen(req) ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 515, in open response = self._open(req, data) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 532, in _open result = self._call_chain(self.handle_open, protocol, protocol + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 1392, in https_open return self.do_open(http.client.HTTPSConnection, req, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 1347, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)>