我正在寻找一些RHEL6服务器,并试图设置它们以使用内部的PyPi服务器(由Nexus 3代理)。
问题是我们的内部PyPi服务器是同一个Nginx服务器上的几个SSL VHosts之一,Python 2.6不是SNI兼容; 因此,easy_install失败,因为它试图从错误的Vhost URL下载,并且由于SNIMissingWarning和InsecurePlatformWarning而导致pip失败。
我查看了https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings上的build议,但似乎这是您自己的脚本的解决方法; 它不能解决Python本身的问题。 无论如何,我安装了urllib3和相关的软件包,问题仍然存在。
[[email protected] ~]# pip install --index https://nexus3.internal/repository/pypi-proxy/simple twine DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6 Collecting twine /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. SNIMissingWarning /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Could not fetch URL https://nexus3.internal/repository/pypi-proxy/simple/twine/: There was a problem confirming the ssl certificate: [Errno 1] _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed - skipping Could not find a version that satisfies the requirement twine (from versions: ) No matching distribution found for twine