python config_error ai_generated true

WARNING: The repository located at my.internal.pypi is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host my.internal.pypi'. ERROR: Could not find a version that satisfies the requirement internal-pkg

ID: python/pip-extra-index-not-trusted

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2024-08-02First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active
3.9 active
3.10 active
3.11 active
3.12 active

Root Cause

pip refuses plain HTTP index hosts by default; an internal mirror over HTTP is filtered out, so its packages appear unavailable.

generic

中文

pip 默认拒绝纯 HTTP 索引主机;通过 HTTP 提供的内部镜像被过滤掉,因此其包看起来不可用。

Workarounds

  1. 95% success
    pip config set global.index-url https://my.internal.pypi/simple
    pip install internal-pkg
  2. 90% success
    pip config set global.trusted-host my.internal.pypi
    pip config set global.extra-index-url http://my.internal.pypi/simple
    pip install internal-pkg

Dead Ends

Common approaches that don't work:

  1. 90% fail

    The internal package does not exist on public PyPI; the index-url override hides the internal mirror entirely.

  2. 90% fail

    DNS resolution is not the issue; pip's HTTP trust policy is.