python
config_error
ai_generated
true
WARNING: The repository located at example.com 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 example.com'.
ID: python/pip-index-url-not-trusted
80%Fix Rate
88%Confidence
0Evidence
2024-05-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
pip is configured to use an HTTP index URL, which is insecure and ignored by default.
generic中文
pip 配置为使用 HTTP 索引 URL,这是不安全的,默认会被忽略。
Workarounds
-
95% success
Use HTTPS for the index URL: `pip install -i https://example.com/simple foo`.
-
80% success
If HTTP is unavoidable, add `--trusted-host example.com` to the pip command or config.
Dead Ends
Common approaches that don't work:
-
90% fail
The index is ignored, so packages won't be found.
-
40% fail
Security risk; may still be blocked by network policies.