如果公司采用防火墙或代理服务器等安全措施,则应将本文中的 URL 添加到允许列表,以确保 Copilot 按预期工作。 用户必须能够向GitHub进行身份验证,并在Copilot或GHE.com上访问GitHub.com服务。
代理服务器或防火墙的每个用户也需要配置自己的环境才能连接到 Copilot。 请参阅 为 GitHub Copilot 配置网络设置。
Copilot 在 GitHub.com 上
建议使用 /meta API 端点来查找在受限网络中使用 GitHub 所需的域名。 有关详细信息,请参阅“允许从受限网络访问GitHub的服务”。
以下请求返回了在 GitHub.com 上对 Copilot 进行身份验证和连接所需的大多数通配符域名。 特定服务存在一些例外情况,或者希望仅允许具有特定 Copilot 计划的用户的流量。
gh api meta -q '.domains | .website, .copilot'
gh api meta -q '.domains | .website, .copilot'
除了这些域,我们建议允许顶点域 github.com。 这不属于 *.github.com 涵盖的内容,而且上述查询也不会返回它,尽管 API 会在 domains.actions 下返回它。
特定必需域
下表列出了所需的 Copilot特定域。 如果已允许终结点返回 /meta 的通配符域,则已隐式允许其中大多数域。
| URL | 目的 |
/meta 响应中的相关通配符 |
|:------------------------------------------------------------| :--------------------------------- | :---------------------------- |
| https://github.com/login/* | Authentication | github.com |
| https://github.githubassets.com | Authentication | *.githubassets.com |
| https://avatars.githubusercontent.com | Authentication | *.githubusercontent.com |
| https://github.com/copilot/* |
Copilot 在 GitHub 上 | github.com |
| https://github.com/enterprises/YOUR-ENTERPRISE/* |
托管用户帐户 的身份验证,仅需要 Enterprise Managed Users 时使用 | github.com |
| https://api.github.com/user | 用户管理 | *.github.com |
| https://api.github.com/copilot_internal/* | 用户管理 | *.github.com |
| https://collector.github.com/* | 分析遥测 | *.github.com |
| https://copilot-telemetry.githubusercontent.com/telemetry |
Copilot 客户端遥测 | *.githubusercontent.com |
| https://default.exp-tas.com |
Copilot 客户端实验 | default.exp-tas.com |
| https://copilot-proxy.githubusercontent.com |
Copilot 建议的 API 服务 | *.githubusercontent.com |
| https://origin-tracker.githubusercontent.com |
Copilot 建议的 API 服务 | *.githubusercontent.com |
| https://*.githubcopilot.com/* | 用于 Copilot 建议的 API 服务。 允许已获授权的用户访问,无论其属于何种 Copilot 计划。 如果使用基于订阅的网络路由,请不要将此 URL 添加到允许列表。 有关基于订阅的网络路由的详细信息,请参阅 管理 GitHub Copilot 对企业网络的访问。 | *.githubcopilot.com |
| https://*.individual.githubcopilot.com | 用于 Copilot 建议的 API 服务。 允许已获授权的用户通过 Copilot Individual 计划进行访问。 如果使用基于订阅的网络路由,请不要将此 URL 添加到允许列表。 | 不包括 |
| https://*.business.githubcopilot.com | 用于 Copilot 建议的 API 服务。 允许授权用户通过 Copilot Business 计划进行访问。 如果要使用基于订阅的网络路由阻止用户在网络上使用 Copilot Business ,请不要将此 URL 添加到允许列表。 | 不包括 |
| https://*.enterprise.githubcopilot.com | 用于Copilot建议的 API 服务 允许授权用户通过 Copilot Enterprise 计划访问。 如果要使用基于订阅的网络路由阻止用户在网络上使用 Copilot Enterprise ,请不要将此 URL 添加到允许列表。 | 不包括 |
| https://copilot-reports.github.com |
Copilot 使用情况指标报告下载 | *.github.com |
| https://copilot-reports-*.b01.azurefd.net |
Copilot 使用情况指标报告下载(回退)。 对于下载绕过自定义域名并由 Azure Front Door CDN 提供的回退场景,此项是必需的。 | 不包括 |
| https://usagereports*.blob.core.windows.net |
Copilot 使用情况指标报告下载(回退)。 在下载绕过 Azure Front Door CDN 并直接由 Azure Blob 存储 提供的回退场景中,此项为必需。 | 不包括 |
Copilot 在 GHE.com 上
如果使用 带有数据驻留权的 GitHub Enterprise Cloud,则企业和 GitHub服务托管在唯一的 GHE.com子域上。
-
允许访问以下域,这些域涵盖大多数必需的服务。
https://*.SUBDOMAIN.ghe.comhttps://SUBDOMAIN.ghe.com
将 SUBDOMAIN 替换为您的企业标识符。
-
如果您计划使用公共代码检测,请允许访问
https://origin-tracker.githubusercontent.com。 这是将生成的代码与托管在 GitHub.com 上的公共代码进行检查所必需的。 有关详细信息,请参阅“GitHub Copilot代码引用”。
在 GitHub.com 上所需的所有其他域,在 GHE.com 上不是必需的。 例如:
- 每个服务在您的子域名下都设有专用端点(例如
https://copilot-proxy.SUBDOMAIN.ghe.com/) - 已在 GHE.com
上禁用客户端试验,因此不需要
https://default.exp-tas.com - GHE.com
不提供个人 Copilot 计划,因此不支持基于订阅的网络路由(例如
https://*.individual.githubcopilot.com)
编辑器特定的要求
除了连接到 Copilot 所需的 URL 之外,还必须确保您的网络规则满足本地客户端的要求(例如,在 Visual Studio Code 中向 vscode.dev 发出的出站请求)。 查找所选客户端的文档,例如:
- Visual Studio Code 文档中
-
Microsoft 文档中[在防火墙或代理服务器后安装和使用 Visual Studio 及 Azure 服务](https://learn.microsoft.com/en-us/visualstudio/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server)
Copilot 语音功能
GitHub Copilot CLI 和 GitHub Copilot app 中的语音功能使用 Foundry Local 在您的计算机上运行语音转文本模型。 若要查询模型目录和下载模型,这些功能会向以下Azure域发出出站请求。 如果要在防火墙或代理服务器后面使用语音功能,请将以下 URL 添加到允许列表:
| 域和/或 URL | 目的 |
|---|---|
https:/ | 模型目录请求 |
https:/ | 检测模型下载的最佳Azure区域 |
https:/ | 区域模型目录终结点 |
https:/ | 从区域Azure Blob 存储下载模型。 |
amlwlrt4* 通配符可匹配 Foundry Local 语音功能用于下载模型的区域性 Azure Blob 存储账户。 特定存储帐户取决于离用户最近的Azure区域。 |
Copilot cloud agent 建议的允许列表
Copilot cloud agent 包含内置防火墙,默认启用推荐的允许列表。 推荐的允许列表允许访问:
- 常见的操作系统包存储库(例如 Debian、Ubuntu、Red Hat)。
- 常见容器注册表(例如,Docker Hub、Azure 容器注册表、AWS 弹性容器注册表)。
- 打包常用编程语言使用的注册表(C#、Dart、Go、Haskell、Java、JavaScript、Perl、PHP、Python、Ruby、Rust、Swift)。
- 常见证书颁发机构(用于允许验证 SSL 证书)。
- 用于下载适用于 Playwright MCP 服务器的 Web 浏览器的主机。
有关配置 Copilot cloud agent 防火墙的详细信息,请参阅 自定义或禁用GitHub Copilot的防火墙。
白名单允许访问以下主机:
Azure基础结构:元数据服务
168.63.129.16
证书颁发机构:DigiCert
crl3.digicert.comcrl4.digicert.comocsp.digicert.com
证书颁发机构:Symantec
ts-crl.ws.symantec.comts-ocsp.ws.symantec.coms.symcb.coms.symcd.com
证书颁发机构:GeoTrust
crl.geotrust.comocsp.geotrust.com
证书颁发机构:Thawte
crl.thawte.comocsp.thawte.com
证书颁发机构:VeriSign
crl.verisign.comocsp.verisign.com
证书颁发机构:GlobalSign
crl.globalsign.comocsp.globalsign.com
证书颁发机构:SSL.com
crls.ssl.comocsp.ssl.com
证书颁发机构:IdenTrust
crl.identrust.comocsp.identrust.com
证书颁发机构:Sectigo
crl.sectigo.comocsp.sectigo.com
证书颁发机构:UserTrust
crl.usertrust.comocsp.usertrust.com
容器注册表:Docker
172.18.0.1ghcr.ioregistry.hub.docker.com*.docker.io*.docker.comproduction.cloudflare.docker.comauth.docker.ioquay.iomcr.microsoft.comgcr.iopublic.ecr.aws
GitHub: 内容和API
*.githubusercontent.comraw.githubusercontent.comobjects.githubusercontent.comlfs.github.comgithub-cloud.githubusercontent.comgithub-cloud.s3.amazonaws.comcodeload.github.comscanning-api.github.comapi.mcp.github.comuploads.github.com/copilot/chat/attachments/
GitHub:动作工件存储
productionresultssa0.blob.core.windows.netproductionresultssa1.blob.core.windows.netproductionresultssa2.blob.core.windows.netproductionresultssa3.blob.core.windows.netproductionresultssa4.blob.core.windows.netproductionresultssa5.blob.core.windows.netproductionresultssa6.blob.core.windows.netproductionresultssa7.blob.core.windows.netproductionresultssa8.blob.core.windows.netproductionresultssa9.blob.core.windows.netproductionresultssa10.blob.core.windows.netproductionresultssa11.blob.core.windows.netproductionresultssa12.blob.core.windows.netproductionresultssa13.blob.core.windows.netproductionresultssa14.blob.core.windows.netproductionresultssa15.blob.core.windows.netproductionresultssa16.blob.core.windows.netproductionresultssa17.blob.core.windows.netproductionresultssa18.blob.core.windows.netproductionresultssa19.blob.core.windows.net
编程语言和包管理器:C# /.NET
nuget.orgdist.nuget.orgapi.nuget.orgnuget.pkg.github.comdotnet.microsoft.compkgs.dev.azure.combuilds.dotnet.microsoft.comdotnetcli.blob.core.windows.netnugetregistryv2prod.blob.core.windows.netazuresearch-usnc.nuget.orgazuresearch-ussc.nuget.orgdc.services.visualstudio.comdot.netdownload.visualstudio.microsoft.comdotnetcli.azureedge.netci.dot.netwww.microsoft.comoneocsp.microsoft.comwww.microsoft.com/pkiops/crl/
编程语言和包管理器:达特
pub.devpub.dartlang.orgstorage.googleapis.com/pub-packages/storage.googleapis.com/dart-archive/
编程语言和包管理器:Go
go.devgolang.orgproxy.golang.orgsum.golang.orgpkg.go.devgoproxy.iostorage.googleapis.com/proxy-golang-org-prod/
编程语言和包管理器:Haskell
haskell.org*.hackage.haskell.orgget-ghcup.haskell.orgdownloads.haskell.org
编程语言和包管理器:Java
www.java.comjdk.java.netapi.adoptium.netadoptium.netsearch.maven.orgmaven.apache.orgrepo.maven.apache.orgrepo1.maven.orgmaven.pkg.github.commaven-central.storage-download.googleapis.commaven.google.commaven.oracle.comjcenter.bintray.comoss.sonatype.orgrepo.spring.iogradle.orgservices.gradle.orgplugins.gradle.orgplugins-artifacts.gradle.orgrepo.grails.orgdownload.eclipse.orgdownload.oracle.com
编程语言和包管理器:Node.js/JavaScript
npmjs.orgnpmjs.comregistry.npmjs.comregistry.npmjs.orgskimdb.npmjs.comnpm.pkg.github.comapi.npms.ionodejs.orgyarnpkg.comregistry.yarnpkg.comrepo.yarnpkg.comdeb.nodesource.comget.pnpm.iobun.shdeno.landregistry.bower.iobinaries.prisma.sh
编程语言和包管理器:Perl
cpan.orgwww.cpan.orgmetacpan.orgcpan.metacpan.org
编程语言和包管理器:PHP
repo.packagist.orgpackagist.orggetcomposer.org
编程语言和包管理器:Python
pypi.python.orgpypi.orgpip.pypa.io*.pythonhosted.orgfiles.pythonhosted.orgbootstrap.pypa.ioconda.binstar.orgconda.anaconda.orgbinstar.organaconda.orgdownload.pytorch.orgrepo.continuum.iorepo.anaconda.com
编程语言和包管理器:Ruby
rubygems.orgapi.rubygems.orgrubygems.pkg.github.combundler.rubygems.orggems.rubyforge.orggems.rubyonrails.orgindex.rubygems.orgcache.ruby-lang.org*.rvm.io
编程语言和包管理器:Rust
crates.ioindex.crates.iostatic.crates.iosh.rustup.rsstatic.rust-lang.org
编程语言和包管理器:Swift
download.swift.orgswift.orgcocoapods.orgcdn.cocoapods.org
基础结构和工具:HashiCorp
releases.hashicorp.comapt.releases.hashicorp.comyum.releases.hashicorp.comregistry.terraform.io
基础结构和工具:JSON 架构
json-schema.orgjson.schemastore.org
基础结构和工具:剧作家
playwright.download.prss.microsoft.comcdn.playwright.devplaywright.azureedge.netplaywright-akamai.azureedge.netplaywright-verizon.azureedge.netstorage.googleapis.com/chrome-for-testing-public
Linux 包管理器:Ubuntu
archive.ubuntu.comsecurity.ubuntu.comppa.launchpad.netkeyserver.ubuntu.comazure.archive.ubuntu.comapi.snapcraft.io
Linux 包管理器:Debian
deb.debian.orgsecurity.debian.orgkeyring.debian.orgpackages.debian.orgdebian.map.fastlydns.netapt.llvm.org
Linux 包管理器:Fedora
dl.fedoraproject.orgmirrors.fedoraproject.orgdownload.fedoraproject.org
Linux 包管理器:CentOS
mirror.centos.orgvault.centos.org
Linux 包管理器:Alpine
dl-cdn.alpinelinux.orgpkg.alpinelinux.org
Linux 包管理器:Arch
mirror.archlinux.orgarchlinux.org
Linux 包管理器:SUSE
download.opensuse.org
Linux 包管理器:Red Hat
cdn.redhat.com
Linux 包管理器:常见包源
packagecloud.iopackages.cloud.google.compackages.microsoft.com
Other
dl.k8s.iopkgs.k8s.io