{"meta":{"title":"以个人订阅者身份管理 GitHub Copilot 策略","intro":"了解如何在 GitHub 更改个人设置来配置 GitHub Copilot 的行为。","product":"GitHub Copilot","breadcrumbs":[{"href":"/zh/copilot","title":"GitHub Copilot"},{"href":"/zh/copilot/how-tos","title":"操作方法"},{"href":"/zh/copilot/how-tos/manage-your-account","title":"管理帐户"},{"href":"/zh/copilot/how-tos/manage-your-account/manage-policies","title":"管理策略"}],"documentType":"article"},"body":"# 以个人订阅者身份管理 GitHub Copilot 策略\n\n了解如何在 GitHub 更改个人设置来配置 GitHub Copilot 的行为。\n\n## 关于 GitHub Copilot 上的 GitHub 设置\n\n除了在受支持的 IDE 中配置GitHub Copilot插件外，还可以在GitHub Copilot上为GitHub配置其设置。 无论何处使用GitHub Copilot，设置都适用。\n\n## 启用或禁用与公共代码匹配的建议\n\n> \\[!NOTE] 如果你是通过组织分配了 GitHub Enterprise Cloud 席位的 GitHub Copilot 上的组织成员，你将无法在个人帐户设置中配置匹配公共代码的建议。 与公共代码匹配的建议设置将从你的组织或企业继承。\n\n您的GitHub Copilot个人设置包括一个选项，可以允许或阻止与公开可用代码匹配的代码建议。\n\n如果你选择阻止匹配公共代码的建议，在大多数 GitHub Copilot 产品中，GitHub Copilot 会将代码建议及其约 150 个字符的周围代码与 GitHub 上的公共代码对比。 如果存在匹配或接近匹配，不会向你显示建议。\n\n如果选择允许匹配公共代码的建议，或者使用不支持“阻止”模式的产品，那么当Copilot建议的代码匹配时，您可以显示匹配的详细信息，并点击进入GitHub上的相关存储库。 有关详细信息，请参阅 [查找与 GitHub Copilot 建议匹配的公共代码](/zh/copilot/how-tos/get-code-suggestions/find-matching-code)。\n\n1. 在 GitHub 任意页面的右上角，单击你的个人资料图片，然后单击 <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>“Copilot settings”\\*\\*\\*\\*。\n2. 在“与公共代码匹配的建议”的右侧，选择下拉菜单，然后单击“允许”以允许与公共代码匹配的建议，或单击“阻止”以阻止与公共代码匹配的建议\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*。\n\n## 在存储库中禁用或启用Copilot cloud agent\n\nCopilot cloud agent允许你分配CopilotGitHub问题或提示Copilot自主执行任务，例如深入研究存储库、规划或代码更改，并可以选择在准备就绪时创建拉取请求。\n\n> \\[!NOTE]\n>\n> * Copilot cloud agent 适用于所有付费 Copilot 计划。\n>\n> 代理在所有存储于GitHub的存储库中可用，除非这些存储库由托管用户帐户拥有或已被显式禁用。\n\nCopilot cloud agent 默认在所有存储库中启用，但可以通过更改帐户设置，阻止它在自己的个人帐户拥有的存储库中使用。\n\n1. 在 GitHub 任意页面的右上角，单击你的个人资料图片，然后单击 <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>“Copilot settings”\\*\\*\\*\\*。\n2. 在边栏中， **<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>Copilot** 单击“ **云代理**”。\n3. 在 Copilot cloud agent 页面上的“策略”下，单击“存储库访问”的下拉列表按钮，然后选择 **“无存储库**”、“ **所有存储库**”或 **“仅选择的存储库**”。\n4. 如果选择 **“仅所选存储库**”，请单击 **“选择存储库** ”，然后选择要启用 Copilot cloud agent的存储库。\n\n对于 GitHub Copilot Business 和 GitHub Copilot Enterprise 订阅者，使用 Copilot cloud agent 能力由组织级别定义的策略设置控制。 请参阅“[将GitHub Copilot云代理添加到组织](/zh/copilot/how-tos/administer-copilot/manage-for-organization/add-copilot-cloud-agent)”。\n\n如果该组织归企业所有，则可以在企业级别控制启用情况。 请参阅“[在企业中启用GitHub Copilot云代理](/zh/enterprise-cloud@latest/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/enable-copilot-cloud-agent)”。\n\n## 在存储库中启用或禁用第三方编码代理\n\n> \\[!NOTE]\n> 适用于所有付费 [Copilot 计划](/zh/copilot/get-started/plans)。\n\n可以选择是否允许在个人帐户中启用以下编码代理：\n\n* Anthropic Claude\n* OpenAI Codex\n\n已安装的 agent apps 也会显示在“合作伙伴代理”下，并且也是以相同方式启用的。 有关详细信息，请参阅 [关于代理应用](/zh/copilot/concepts/agents/agent-apps)。\n\n编程代理能够访问Copilot cloud agent已启用的相同存储库。\n\n若要启用编程代理，请执行以下步骤：\n\n1. 导航到帐户的 [云代理设置](https://github.com/settings/copilot/coding_agent?ref_product=copilot\\&ref_type=engagement\\&ref_style=text\\&utm_source=docs-3p-agents-cca-settings-cta\\&utm_medium=docs\\&utm_campaign=agent-3p-platform-feb-2026)。\n2. 在 Copilot cloud agent 页面上的“合作伙伴代理”下，单击该开关以启用要使用的第三方代理。\n\n## 启用或禁用 GitHub Copilot Chat 的网页搜索\n\n你可为 GitHub Copilot Chat\n启用网页搜索。 默认情况下，此设置处于禁用状态。 如果启用此设置， Copilot Chat 将使用必应搜索 Internet 以获取与问题相关的信息。 Bing搜索在讨论新技术或高度特定的主题时特别有用。\n\n1. 在 GitHub 任意页面的右上角，单击你的个人资料图片，然后单击 <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>“Copilot settings”\\*\\*\\*\\*。\n2. 在 Bing **Copilot 访问权限右侧**，选择下拉菜单，然后单击“启用”\\*\\*\\*\\* 或“禁用”\\*\\*\\*\\*。\n\n## 模型训练和改进\n\n> \\[!NOTE]\n> GitHub 不使用 Copilot Business 或 Copilot Enterprise 客户数据来训练 AI 模型。 Copilot Business 和 Copilot Enterprise 客户的数据在“数据保护协议”下 GitHub受到保护，该协议禁止在未经客户授权的情况下使用此类数据。\n\n从 2026 年 4 月 24 日开始，如果你有一个**Copilot Free**、**Copilot Pro** 或\\*\\*Copilot Pro+\\*\\***Copilot Max** 计划，GitHub则可以使用与GitHub功能和服务的交互（包括输入、输出、代码片段和相关上下文）来训练和改进 AI 模型。 通过此更改，我们可以基于实际开发模式构建更智能的上下文感知编码帮助。 您可以在 GitHub Copilot 的个人设置中选择不允许将您的数据用于训练。 有关如何使用和共享数据的信息，[请参阅隐私声明。](/zh/site-policy/privacy-policies/github-general-privacy-statement)\n\n1. 在 GitHub 任意页面的右上角，单击你的个人资料图片，然后单击 <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>“Copilot settings”\\*\\*\\*\\*。\n\n2. 选择“允许GitHub使用我的数据进行 AI 模型训练”下拉菜单，然后单击**Disabled**。\n\n   如果未看到“允许GitHub使用我的数据进行 AI 模型训练”，请验证你未使用具有 Copilot Business 或 Copilot Enterprise 许可证的帐户登录。\n   Copilot Business 和 Copilot Enterprise 客户的数据在 GitHub 的数据保护协议下受到保护，因此不会为这些计划显示设置。\n\n   1. 若要验证帐户类型，请参阅 [查看和更改GitHub Copilot 计划](/zh/copilot/how-tos/manage-your-account/view-and-change-your-copilot-plan)。"}