policy auth_error ai_generated true

Error: The self-hosted runner's IP address is not allowed by the organization's network policy.

ID: policy/github-actions-self-hosted-runner-ip-restricted

Also available as: JSON · Markdown · 中文
92%Fix Rate
87%Confidence
1Evidence
2024-06-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
GitHub Actions 2024-06-01 active
actions/runner 2.315.0 active

Root Cause

Organization network policy restricts outbound traffic from self-hosted runners to specific IP ranges, and the runner's IP is not whitelisted.

generic

中文

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

Official Documentation

https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners

Workarounds

  1. 95% success Add the self-hosted runner's public IP to the organization's allowed IP list via GitHub settings > Organization > Security > Network policy.
    Add the self-hosted runner's public IP to the organization's allowed IP list via GitHub settings > Organization > Security > Network policy.
  2. 90% success Use GitHub-hosted runners instead, which have dynamic IPs already whitelisted by most policies.
    Use GitHub-hosted runners instead, which have dynamic IPs already whitelisted by most policies.

中文步骤

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

Dead Ends

Common approaches that don't work:

  1. Disable the organization's network policy entirely 90% fail

    Network policies are enforced by security teams; disabling them requires approval and may violate compliance.

  2. Use a different self-hosted runner with the same IP 100% fail

    The IP is the same; the policy blocks the IP range, not the runner itself.