# 警告：位于 my.internal.pypi 的仓库不是受信任或安全的主机，已被忽略。如果该仓库可通过 HTTPS 访问，我们建议你改用 HTTPS，否则你可以通过 '--trusted-host my.internal.pypi' 消除此警告并允许它。
错误：找不到满足 internal-pkg 要求的版本

- **ID:** `python/pip-extra-index-not-trusted`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

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

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   pip config set global.index-url https://my.internal.pypi/simple
pip install internal-pkg
   ```
2. **** (90% 成功率)
   ```
   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
   ```

## 无效尝试

- **** — The internal package does not exist on public PyPI; the index-url override hides the internal mirror entirely. (90% 失败率)
- **** — DNS resolution is not the issue; pip's HTTP trust policy is. (90% 失败率)
