代码之家  ›  专栏  ›  技术社区  ›  dzieciou

为安装工具配置受信任主机

  •  0
  • dzieciou  · 技术社区  · 6 年前

    当我呼唤 pip install 对于具有不受信任证书的PYPI存储库,我可以使用--trusted host选项跳过SSL验证:

    $ pip install googleapis-common-protos --index-url https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple --trusted-host maven.mycompany.org
    Looking in indexes: https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple
    Collecting googleapis-common-protos
      Downloading https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/packages/61/29/1549f61917eadd11650e42b78b4afcfe9cb467157af4510ab8cb59535f14/googleapis-common-protos-1.5.6.tar.gz
    ...
    Installing collected packages: googleapis-common-protos
    Successfully installed googleapis-common-protos-1.5.6
    

    但是,在使用设置工具时,我看不到配置它的选项:

    $ python setup.py test
    running pytest
    Searching for googleapis-common-protos==1.5.3
    Reading https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple/googleapis-common-protos/
    Authenticating as uploader for https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple/googleapis-common-protos/ (from .pypirc)
    Download error on https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple/googleapis-common-protos/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726) -- Some packages may not be found!
    
    1 回复  |  直到 6 年前
        1
  •  1
  •   phd    6 年前

    setuptools easy_install easy_install

    python setup.py easy_install --help
    

    --trusted-host pip