python - 通过 Twine 将 py 文件上传到代理服务器时出现 SSL 错误
问题描述
python setup.py sdist bdist_wheel
我已经在 Ubuntu 机器上打包了一个 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.c
抱怨cpython
(https://github.com/python/cpython/blob/master/Modules/_ssl.c)
SSL_TLSEXT_ERR_OK
确切是什么意思?我无法弄清楚证书有什么问题,因为它适用于我针对它运行的其他应用程序。
解决方案
原来我的 Artifactory 代理服务器存在证书问题
推荐阅读
- javascript - 如何获取对仅存在于内存中的 HTML 元素的引用
- java - API 响应提取值 - 序言中不允许内容
- asp.net - IIS 不提供任何静态文件
- glog - 如何在一个进程中使用 GLOG 将日志写入不同的日志文件
- python - Python 将日期时间索引(复数索引)转换为多个日期时间范围
- python - 主线程执行时不显示进度指示器
- cmake - CMake add_library 与未来的来源
- sql - Sqlite 连接两个表
- python - ModuleNotFoundError:没有名为“tensorflow.python.keras.applications.MobileNetV2”的模块
- python - 显示列表元素,就好像它们是输入的一样