Skip to main content

Managing policies for Copilot in your organization

Learn how to manage policies for GitHub Copilot in your organization.

谁可以使用此功能?

Organization owners

Organizations with a subscription to GitHub Copilot Business or GitHub Copilot Enterprise

About policies for GitHub Copilot

Organization owners can set policies to govern how GitHub Copilot can be used within the organization. For example, an organization owner can enable or disable the following Copilot features (unless an enterprise owner has blocked access to these features at the enterprise level):

  • Copilot in GitHub.com
  • Copilot Chat in the IDE
  • Copilot Chat in GitHub Mobile
  • Copilot in the CLI and Windows Terminal
  • Suggestions matching public code
  • Access to alternative models for Copilot

The policy settings selected by an organization owner determine the behavior of GitHub Copilot for all organization members that have been granted access to Copilot through the organization.

Copilot policies are also managed at the enterprise level. If your organization is part of an enterprise, and explicit settings have been selected at the enterprise level, you cannot override those settings at the organization level. For more information on managing policies at the enterprise level, see "管理企业中 Copilot 的策略和功能."

Policies for suggestion matching

Organization settings include an option to either allow or block code suggestions that match publicly available code. If you choose to block suggestions matching public code, GitHub Copilot will check potential code suggestions and the surrounding code of about 150 characters against public code on GitHub. If there is a match, or a near match, the suggestion is not shown.

If your enterprise admin has selected No policy for suggestion matching at the enterprise level, you can set a suggestion matching policy for your organization.

If an organization member is assigned a seat by multiple organizations with different suggestion matching policies under the same enterprise, GitHub Copilot will use the most restrictive policy.

Enabling Copilot features in your organization

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击 你的组织”。

  2. 在组织旁边,单击“设置”。

  3. 在边栏的“代码、规划和自动化”下,单击“ Copilot”,然后按下“策略”

  4. Use the dropdown options to the right of each feature to enable or disable that feature for your organization.

    For example, to enable or disable suggestion matching, in the "Suggestions matching public code" dropdown, select Allowed or Blocked.

  5. If your organization has a Copilot Business or Copilot Enterprise subscription and you enable "Copilot in GitHub.com", two additional options are displayed:

    • 选择加入用户反馈收集:如果启用,用户可以提供有关 Copilot 拉取请求摘要的反馈。 有关详细信息,请参阅“使用 GitHub Copilot 创建拉取请求摘要”。

    • 选择预览功能:如果启用,用户可以测试尚未正式发布的新 Copilot 功能。 请注意,功能的预览可能有缺陷,功能可能会随时更改或停止。 Copilot 功能的当前预览包括:

Setting a policy for GitHub Copilot Extensions in your organization

Note

GitHub Copilot Extensions 为 公共预览版,可能随时更改。

GitHub Copilot Extensions integrate external tools with GitHub Copilot Chat. See "使用扩展将外部工具与 Copilot Chat 集成."

Before you install Copilot Extensions in your organization, you should set a usage policy for your organization. Setting a usage policy allows you to enable or disable Copilot Extensions for all members of your organization, limiting your security risk.

If Copilot Extensions have not been enabled or disabled at the enterprise level, you can set a Copilot Extensions policy for your organization.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击 你的组织”。
  2. 在组织旁边,单击“设置”。
  3. 在边栏的“代码、规划和自动化”下,单击“ Copilot”,然后按下“策略”
  4. In the "Copilot Extensions" section, select the dropdown menu, then enable or disable Copilot Extensions for your organization.

Managing permissions for a GitHub Copilot Extension in your organization

After you have installed a Copilot Extension in your organization, you can view the permissions the extension has in your organization, and why those permissions are necessary. If you do not want the Copilot Extension to have the listed permissions, you can suspend or uninstall the extension.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击 你的组织”。
  2. 在组织旁边,单击“设置”。
  3. 在边栏中的“第三方访问权限”下,单击 GitHub Apps。 此时会显示组织中安装的 GitHub Apps 的列表。
  4. Optionally, to filter your installed GitHub Apps for Copilot Extensions, select the Filter: dropdown menu, then click Copilot Extensions.
  5. Next to the Copilot Extension you want to review or modify, click Configure.
  6. In the "Permissions" section, review the permissions listed for the Copilot Extension. Optionally, you can block the Copilot Extension's access to your organization in one of two ways:
    • To indefinitely suspend the Copilot Extension's access to resources in your organization while keeping the extension installed, in the "Danger zone" section, click Suspend.
    • To uninstall a Copilot Extension completely, in the "Danger zone" section, click Uninstall.

Further reading