将包添加到 PyPi 时发生 SSL 错误

Ale*_*ing 5 python ssl pypi twine

我正在尝试向 PyPi 添加一个包,以便可以使用 Pip 安装它。我正在尝试使用添加它twine upload dist/*

这导致我收到多个 SSL 错误,例如raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='upload.pypi.org', port=443): Max retries exceeded with url: /legacy/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))).

我正在使用学校笔记本电脑,我认为这是我的管理员所做的事情,但是我可以使用 pip 安装东西pip3 install --trusted-host pypi.org --trusted-h\ost files.pythonhosted.org。我想知道是否还有另一个可以将我的包添加到 pip 中?

Jon*_*n S 5

我的猜测是您的学校已经采取了一些措施,他们正在用自己的证书替换原始证书,您也许可以使用--cert并引用您学校证书的路径来绕过它,但我认为更简单的解决方法是将文件复制到非学校计算机并从那里上传。