---
title: "api.github.com 是什么？阻止它会造成什么问题 · Kilobat"
url: "https://kilobat.app/zh-hans/hosts/api-github-com"
description: "api.github.com 是 GitHub REST API 的基础 URL。哪些 App 会调用它、请求如何认证，以及阻止它会造成什么问题。"
---

# api.github.com 是什么？

`api.github.com` 是 GitHub REST API 的基础 URL。命令行工具、编辑器和脚本会调用它。

由 GitHub 运营 · 端口：443 TCP · 核查日期：2026 年 11 月 7 日

## 简短回答

GitHub REST API 端点。App 和脚本带着令牌和 User-Agent 标头向它发送经过认证的请求。

谨慎阻止

阻止它会让使用 GitHub API 的工具和 App 停止工作。通过 `github.com` 使用的 Git 本身仍可正常工作。

匹配

`api.github.com`

带有 `*.` 的名称涵盖它之下的每个名称：`*.push.apple.com` 匹配 `1-courier.push.apple.com`。

## 它提供什么

GitHub 的 REST API 页面给出 `https://api.github.com` 作为请求的基础 URL。

它说明请求在 `Authorization` 标头中携带令牌，并且每个请求都需要有效的 `User-Agent` 标头。没有该标头的请求会被拒绝。

该 API 会限制一段时间内的请求数量。GitHub 表示，经过认证后每小时可以发出更多请求。

GitHub 的运行器页面把 `api.github.com` 列在“Needed for essential operations”下。

请求及其令牌是加密的。仅凭一个连接看不出程序发出了哪个调用。

## 阻止它会造成什么问题

谨慎阻止

阻止它会让使用 GitHub API 的工具和 App 停止工作。通过 `github.com` 使用的 Git 本身仍可正常工作。

阻止它会造成什么问题

- 通过该 API 列出议题、拉取请求或仓库的工具会失败。
- GitHub Actions 自托管运行器无法访问必要的服务。

使用 Kilobat Pro 和网络过滤器，你可以对所有 App 或某一个 App 阻止某个主机：在“连接”中选择一个连接，然后选择“阻止”。Apple 自己的服务绝不会被 Kilobat 的[防护](https://kilobat.app/zh-hans/docs/blocking#protection)列表阻止。

## 备注

同一个主机还在 `/meta` 提供 Meta API，其中列出了 GitHub 的 IP 范围。GitHub 表示该列表并不详尽。

## 参考资料

- [GitHub 文档：REST API 入门](https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api)
- [GitHub 文档：自托管运行器，通信要求](https://docs.github.com/en/actions/reference/runners/self-hosted-runners)
- [GitHub 文档：关于 GitHub 的 IP 地址](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses)

核对于 2026 年 11 月 7 日。

## 相关

- [github.com](https://kilobat.app/zh-hans/hosts/github-com): GitHub 的主主机。Git 克隆和推送、网站和登录都会用到它，GitHub 的运行器和插件工具也把它列为必需。
