通过Twin将py文件上载到代理服务器时出现SSL错误

2024-06-16 09:00:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Ubuntu机器上使用python setup.py sdist bdist_wheel打包了一个python应用程序。在

我想把这些文件上传到Artifactory的代理服务器。我使用下面的绳线命令来执行此操作

twine upload --repository-url https://apro.example.net.au/api/pypi/example-python -u username -p password dist/* --client-cert /usr/lib/ssl/certs/my_cert.pem

当我运行这个命令时,我得到了以下错误 SSLError: HTTPSConnectionPool(host='apro.example.net.au', port=443): Max retries exceeded with url: /api/pypi/example-python (Caused by SSLError(SSLError(336265225, '[SSL] PEM lib (_ssl.c:2959)'),))

我已经将我的my_certs.pem放入/usr/lib/ssl/certs/并运行update-ca-certificates以确保证书是最新的。在

当我试图找出SSLError是什么时,我遇到了它在_ssl.ccpythonhttps://github.com/python/cpython/blob/master/Modules/_ssl.c)中抱怨的行

确切地说是什么意思?我不知道证书有什么问题,因为它可以很好地与我运行的其他应用程序一起工作。在


Tags: https命令pypiapi应用程序urlsslcert