python-poetry / python-poetry/install.python-poetry.org
Windows Server Install: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 255
- Forks
- 65
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 1
Description
Related #76 (now closed)
Windows Server 2022 Standard.
PS C:\Users\Administrator> py --version
Python 3.10.11
PS C:\Users\Administrator> pip --version
pip 23.1.2 from C:\Python310\lib\site-packages\pip (python 3.10)
PS C:\Users\Administrator> (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
Retrieving Poetry metadata
Traceback (most recent call last):
File "C:\Python310\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Python310\lib\http\client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Python310\lib\http\client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Python310\lib\http\client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Python310\lib\http\client.py", line 1038, in _send_output
self.send(msg)
File "C:\Python310\lib\http\client.py", line 976, in send
self.connect()
File "C:\Python310\lib\http\client.py", line 1455, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Python310\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "C:\Python310\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "C:\Python310\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 940, in <module>
File "<stdin>", line 919, in main
File "<stdin>", line 516, in run
File "<stdin>", line 775, in get_version
File "<stdin>", line 836, in _get
File "C:\Python310\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Python310\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Python310\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Python310\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Python310\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Python310\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)>
However, unlike #76, installing certifi package does not solve the problem anymore.
PS C:\Users\Administrator> pip install --upgrade certifi
Collecting certifi
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Installing collected packages: certifi
Successfully installed certifi-2022.12.7
PS C:\Users\Administrator>
PS C:\Users\Administrator> (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
Retrieving Poetry metadata
Traceback (most recent call last):
File "C:\Python310\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Python310\lib\http\client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Python310\lib\http\client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Python310\lib\http\client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Python310\lib\http\client.py", line 1038, in _send_output
self.send(msg)
File "C:\Python310\lib\http\client.py", line 976, in send
self.connect()
File "C:\Python310\lib\http\client.py", line 1455, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Python310\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "C:\Python310\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "C:\Python310\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 940, in <module>
File "<stdin>", line 919, in main
File "<stdin>", line 516, in run
File "<stdin>", line 775, in get_version
File "<stdin>", line 836, in _get
File "C:\Python310\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Python310\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Python310\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Python310\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Python310\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Python310\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure from install.python-poetry.org on Windows Server 2022 with Python 3.10.11, then inspect the urllib and ssl calls shown in the traceback. Done means the Poetry installer can retrieve its metadata successfully in this environment, including when certifi is installed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100