Skip to main content

在 GitHub.com 上配置 GitHub Copilot 设置

可以在 GitHub.com 上更改个人设置,以配置 GitHub Copilot 的行为。 这会影响 GitHub Copilot 在你使用的任何受支持的 IDE 中的工作方式。

谁可以使用此功能?

People with individual GitHub Copilot subscriptions can configure their settings on GitHub.com.

可通过 GitHub Copilot Individual的个人账户,通过组织 或通过 GitHub Copilot Business企业帐户,或通过 GitHub Copilot Enterprise 企业帐户对 GitHub Copilot 进行管理。

GitHub Copilot 供经过验证的学生、教师和热门开源项目的维护人员免费使用。 有关详细信息,请参阅“关于 GitHub Copilot 的计费”。

About GitHub Copilot settings on GitHub.com

In addition to the configuration for the GitHub Copilot plugin in your supported IDE, you can configure settings for GitHub Copilot on GitHub.com. The settings apply wherever you use GitHub Copilot.

Configuring GitHub Copilot settings on GitHub.com

Before you can start using GitHub Copilot, you will need to set up a free trial or subscription. For more information about setting up a trial or subscription for your personal account, see "Managing your GitHub Copilot Individual subscription." For more information about setting up a subscription for your organization or enterprise, see "Managing your GitHub Copilot Business subscription" or "Managing your GitHub Copilot Enterprise subscription."

Once you have an active GitHub Copilot Individual trial or subscription, you can adjust GitHub Copilot settings for your personal account on GitHub in the GitHub Copilot settings. The settings apply anywhere that you use GitHub Copilot. You can configure the suggestions that GitHub Copilot offers and how GitHub uses your telemetry data.

Enabling or disabling duplication detection

Note: If you are a member of an organization on GitHub Enterprise Cloud who has been assigned a GitHub Copilot seat through your organization, you will not be able to configure duplication detection in your personal account settings. Your duplication detection setting will be inherited from your organization or enterprise.

Your personal settings for GitHub Copilot include an option to either allow or block code completion suggestions that match publicly available code. If you choose to block suggestions matching public code, GitHub Copilot checks code completion suggestions with their 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 to you.

If you choose to allow suggestions matching public code, and you accept a suggestion for which one or more matches were found, you can click through from an entry in the GitHub Copilot log to view a list of references on GitHub. For more information, see "Finding public code that matches GitHub Copilot suggestions."

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Screenshot of a user's account menu on GitHub. The menu item "Settings" is outlined in dark orange.

  2. In the left sidebar, click Copilot.

  3. Under Suggestions matching public code, select the dropdown menu, then click Allow to allow suggestions matching public code, or Block to block suggestions matching public code.

  4. To confirm your new settings, click Save.

Further reading