python
config_error
ai_generated
true
WARNING: The repository located at internal-pypi.local is not a trusted or secure host and is being ignored.
ID: python/pip-index-url-ssl-hostname-mismatch
80%Fix Rate
84%Confidence
0Evidence
2025-04-11First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
Using an HTTP or self-signed internal index without configuring pip to trust it.
generic中文
使用 HTTP 或自签名的内部索引,但未配置 pip 信任它。
Workarounds
-
90% success
cat > ~/.pip/pip.conf <<'EOF' [global] index-url = https://internal-pypi.local/simple trusted-host = internal-pypi.local EOF pip install foo
-
85% success
export PIP_CERT=/path/to/ca.pem pip install --index-url https://internal-pypi.local/simple foo
Dead Ends
Common approaches that don't work:
-
70% fail
pip refuses plain HTTP by default and warns/ignores the index.
-
90% fail
Breaks other HTTPS connections and security.