Skip to main content

GitHub

The cipr github command allows you to retrieve IP ranges for GitHub services (Actions, web, API, git, hooks, Pages, packages, importer, and more).

Usage

CLI command
cipr github [flags]

Data Format

You can find data format (and filter value guidelines) of the github command output here: GitHub command data format

Flags

FlagDescriptionDefaultRequiredMultiple values
--ipv4Get only IPv4 ranges.
--ipv6Get only IPv6 ranges.
--filter-serviceFilter results by GitHub service (e.g. actions, web, api, git, hooks, pages, packages, importer, github_enterprise_importer).
--listList unique values for a dimension instead of IP ranges. Valid: services.

When neither --ipv4 nor --ipv6 is set, both are fetched. --list composes with --filter-service but ignores --ipv4/--ipv6. The set of available services is derived live from the GitHub meta endpoint, so any service added by GitHub appears automatically without a cipr update.

Examples

tip

IP ranges in the 'Output' blocks might not be up to date!

Get all GitHub IPv4 ranges

CLI command
cipr github --ipv4
Output
...
140.82.112.0/20
185.199.108.0/22
192.30.252.0/22
...

Get GitHub Actions IPv4 ranges

CLI command
cipr github --filter-service actions --ipv4
Output
...
4.148.0.0/16
4.149.0.0/18
13.105.49.0/24
...

Get GitHub git IPv6 ranges with mini verbosity

CLI command
cipr github --filter-service git --ipv6 --verbose-mode mini
Output
...
2a0a:a440::/29,git
2606:50c0::/32,git
...

Get all GitHub web ranges with full verbosity

CLI command
cipr github --filter-service web --verbose
Output
...
IP Prefix: 140.82.112.0/20, Service: web
IP Prefix: 185.199.108.0/22, Service: web
IP Prefix: 2a0a:a440::/29, Service: web
...

List all GitHub services

CLI command
cipr github --list services
Output
...
actions
api
copilot
git
hooks
importer
packages
pages
web
...