# 错误：自托管运行器的IP地址不被组织的网络策略允许。

- **ID:** `policy/github-actions-self-hosted-runner-ip-restricted`
- **领域:** policy
- **类别:** auth_error
- **验证级别:** ai_generated
- **修复率:** 92%

## 根因

组织网络策略限制自托管运行器的出站流量到特定IP范围，而运行器的IP未被列入白名单。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| GitHub Actions 2024-06-01 | active | — | — |
| actions/runner 2.315.0 | active | — | — |

## 解决方案

1. ```
   通过GitHub设置 > 组织 > 安全 > 网络策略，将自托管运行器的公共IP添加到组织的允许IP列表中。
   ```
2. ```
   改用GitHub托管的运行器，这些运行器具有动态IP，已大多数策略列入白名单。
   ```

## 无效尝试

- **Disable the organization's network policy entirely** — Network policies are enforced by security teams; disabling them requires approval and may violate compliance. (90% 失败率)
- **Use a different self-hosted runner with the same IP** — The IP is the same; the policy blocks the IP range, not the runner itself. (100% 失败率)
