From c03048ff8c929a2b81699d2c7ff02bd4792147a7 Mon Sep 17 00:00:00 2001 From: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:30:37 +0000 Subject: [PATCH] Document authentication requirements for Copilot on GHE.com (#53146) --- ...ub-enterprise-cloud-with-data-residency.md | 8 ++ ...ub-enterprise-cloud-with-data-residency.md | 3 +- ...ring-github-copilot-in-your-environment.md | 4 + .../configure-personal-settings/index.md | 1 + ...b-copilot-extension-in-your-environment.md | 8 ++ ...ithub-copilot-with-an-account-on-ghecom.md | 99 +++++++++++++++++++ ...g-up-github-copilot-for-your-enterprise.md | 2 + ...up-github-copilot-for-your-organization.md | 2 + ...oting-common-issues-with-github-copilot.md | 2 + ...issues-with-github-copilot-chat-in-ides.md | 2 + data/reusables/copilot/sign-in-ghecom.md | 1 + 11 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 content/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom.md create mode 100644 data/reusables/copilot/sign-in-ghecom.md diff --git a/content/admin/data-residency/about-github-enterprise-cloud-with-data-residency.md b/content/admin/data-residency/about-github-enterprise-cloud-with-data-residency.md index 7dd6aa9f9382..c166774885c6 100644 --- a/content/admin/data-residency/about-github-enterprise-cloud-with-data-residency.md +++ b/content/admin/data-residency/about-github-enterprise-cloud-with-data-residency.md @@ -57,6 +57,7 @@ The developer experience on {% data variables.enterprise.data_residency_site %} * [Functionality for managed user accounts](#functionality-for-managed-user-accounts) * [Repository visibility](#repository-visibility) * [API access](#api-access) +* [{% data variables.product.prodname_copilot %}](#github-copilot) * [Documentation](#documentation) ### Identity and access @@ -87,6 +88,13 @@ Users can simplify API requests by using the {% data variables.product.prodname_ Rate limits apply for requests to the REST API. See "[AUTOTITLE](/rest/overview/rate-limits-for-the-rest-api)." +### {% data variables.product.prodname_copilot %} + +Your developers can access {% data variables.product.prodname_copilot %} if you grant them access to a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription. {% data variables.enterprise.prodname_managed_users_caps %} cannot sign up for {% data variables.product.prodname_copilot_individuals_short %}. + +* Users must perform some additional setup to authenticate to their account from their development environment. See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom)." +* Certain {% data variables.product.prodname_copilot %} features are currently unavailable on {% data variables.enterprise.data_residency_site %}. See "[AUTOTITLE](/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency#currently-unavailable-features)." + ### Documentation In general, the content on [{% data variables.product.prodname_docs %}](/enterprise-cloud@latest) reflects the user experience on {% data variables.enterprise.data_residency_site %}. Readers should use the "{% data variables.product.product_name %}" version of the site. See "[AUTOTITLE](/get-started/using-github-docs/about-versions-of-github-docs#about-versions-of-github-docs)." diff --git a/content/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency.md b/content/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency.md index 6804955e8c0e..34a568ea2d3e 100644 --- a/content/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency.md +++ b/content/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency.md @@ -27,7 +27,8 @@ The following features are currently unavailable on {% data variables.enterprise | Achievements | Currently unavailable. | "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/viewing-contributions-on-your-profile)" | | Microsoft Teams integrations | Currently unavailable. | "[AUTOTITLE](/get-started/exploring-integrations/featured-github-integrations#team-communication-tools)" | | {% data variables.product.prodname_importer %} | Currently unavailable | "[AUTOTITLE](/migrations/importing-source-code/using-github-importer/about-github-importer)" | -| {% data variables.product.prodname_copilot %} Workspaces | Currently unavailable | | +| {% data variables.product.prodname_copilot %} Workspaces | Currently unavailable | N/A | +| {% data variables.product.prodname_copilot_extensions %} | Currently unavailable | "[AUTOTITLE](/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat)" | | Interactive maps | Currently can't use GeoJSON/TopoJSON syntax to create interactive maps. | "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-geojson-and-topojson-maps)" | | Usage metrics for {% data variables.product.prodname_actions %} | Currently unavailable | "[AUTOTITLE](/organizations/collaborating-with-groups-in-organizations/viewing-usage-metrics-for-github-actions)" | | Some features currently in {% data variables.release-phases.public_preview %} or {% data variables.release-phases.private_preview %} | Certain features that are in a preview phase on {% data variables.product.prodname_dotcom_the_website %} may not be available on {% data variables.enterprise.data_residency_site %} | | diff --git a/content/copilot/managing-copilot/configure-personal-settings/configuring-github-copilot-in-your-environment.md b/content/copilot/managing-copilot/configure-personal-settings/configuring-github-copilot-in-your-environment.md index 44beb7bc7054..a392092538f1 100644 --- a/content/copilot/managing-copilot/configure-personal-settings/configuring-github-copilot-in-your-environment.md +++ b/content/copilot/managing-copilot/configure-personal-settings/configuring-github-copilot-in-your-environment.md @@ -451,3 +451,7 @@ After updating the extension, Xcode must be restarted for the changes to take ef {% data reusables.copilot.dotcom-settings %} {% endxcode %} + +## Authenticating to an account on {% data variables.enterprise.data_residency_site %} + +{% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom)." diff --git a/content/copilot/managing-copilot/configure-personal-settings/index.md b/content/copilot/managing-copilot/configure-personal-settings/index.md index 200b56efaea0..095bd93c1960 100644 --- a/content/copilot/managing-copilot/configure-personal-settings/index.md +++ b/content/copilot/managing-copilot/configure-personal-settings/index.md @@ -12,6 +12,7 @@ children: - /configuring-network-settings-for-github-copilot - /configuring-github-copilot-in-your-environment - /configuring-github-copilot-in-the-cli + - /using-github-copilot-with-an-account-on-ghecom redirect_from: - /copilot/configuring-github-copilot diff --git a/content/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment.md b/content/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment.md index e8c99ed2a800..278981529bd0 100644 --- a/content/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment.md +++ b/content/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment.md @@ -68,6 +68,8 @@ The following procedure will guide you through installation of the {% data varia 1. After your JetBrains IDE has restarted, click the **Tools** menu. Click **{% data variables.product.prodname_copilot %}**, then click **Login to {% data variables.product.prodname_dotcom %}**. + >[!NOTE] {% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom?tool=jetbrains#authenticating-from-jetbrains-ides)." + ![Screenshot of the expanded "Tools" menu and "{% data variables.product.prodname_copilot %}" sub-menu. The "Login to {% data variables.product.prodname_dotcom %}" option is highlighted in blue.](/assets/images/help/copilot/jetbrains-tools-menu.png) 1. In the "Sign in to {% data variables.product.prodname_dotcom %}" dialog box, to copy the device code and open the device activation window, click **Copy and Open**. @@ -154,6 +156,8 @@ Starting from {% data variables.product.prodname_vs %} 2022 Version 17.10, the u 1. After installing the {% data variables.product.prodname_copilot %} extension, to enable {% data variables.product.prodname_copilot %}, ensure you have added your {% data variables.product.prodname_dotcom %} account to {% data variables.product.prodname_vs %}. For more information, see [Add your {% data variables.product.prodname_dotcom %} accounts to your {% data variables.product.prodname_vs %} keychain](https://learn.microsoft.com/en-us/visualstudio/ide/work-with-github-accounts) in the Microsoft documentation. + >[!NOTE] {% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom?tool=visualstudio#authenticating-from-visual-studio)." + {% endvisualstudio %} {% vscode %} @@ -176,6 +180,8 @@ To see instructions for other popular coding environments, use the tool switcher 1. Install the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) in {% data variables.product.prodname_vscode %}. For detailed instructions, see "[Set up {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/docs/copilot/setup)" in the {% data variables.product.prodname_vscode %} documentation. + >[!NOTE] {% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom?tool=vscode#authenticating-from-vs-code)." + {% endvscode %} {% xcode %} @@ -210,6 +216,8 @@ After granting the required permissions, restart Xcode. You will see a new item Before you can use the {% data variables.product.prodname_copilot %} extension for Xcode, you need to authorize the extension to access your {% data variables.product.github %} account. +>[!NOTE] {% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom?tool=xcode#authenticating-from-xcode)." + 1. Open the {% data variables.product.prodname_copilot %} extension application. 1. Click **Login to {% data variables.product.github %}** and follow the prompts to authorize the extension. diff --git a/content/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom.md b/content/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom.md new file mode 100644 index 000000000000..fb6b0fe7275b --- /dev/null +++ b/content/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom.md @@ -0,0 +1,99 @@ +--- +title: Using GitHub Copilot with an account on GHE.com +shortTitle: Authenticate to GHE.com +intro: 'Update your development environment to access a {% data variables.product.prodname_copilot_short %} subscription for an account on {% data variables.enterprise.data_residency_site %}.' +versions: + feature: copilot +defaultTool: vscode +topics: + - Copilot +--- + +To use {% data variables.product.prodname_copilot %} in an IDE or the command line, you must authenticate to an account on {% data variables.product.github %} that has a {% data variables.product.prodname_copilot_short %} license. + +If you receive access to {% data variables.product.prodname_copilot_short %} through a {% data variables.enterprise.prodname_managed_user %} owned by an enterprise on {% data variables.enterprise.data_residency_site %}, you may need to adjust some settings in your IDE before you can authenticate to your account. + +Use the **tabs at the top of this article** to see instructions for your environment. + +{% vscode %} + +## Authenticating from {% data variables.product.prodname_vscode_shortname %} + +1. To open your {% data variables.product.prodname_vscode_shortname %} settings, press Command+, (Mac) or Ctrl+, (Windows). +1. In the search bar, search for `enterprise`. +1. For the `Github-enterprise: Uri` setting, enter the URL where you access {% data variables.product.github %}. For example: `https://{% data variables.enterprise.data_residency_example_domain %}`. +1. In the {% data variables.product.prodname_vscode_shortname %} settings, search for `copilot`. +1. Under "GitHub > Copilot: Advanced," click **Edit in settings.json**. +1. Inside the `github.copilot.advanced` property, add `"authProvider": "github-enterprise"`. For example: + + ```json copy + "github.copilot.advanced": { + "authProvider": "github-enterprise" + }, + ``` + +1. Save the `settings.json` file. +1. You will be shown a prompt asking you to sign in to use {% data variables.product.prodname_copilot %}. Click **Sign in to {% data variables.product.github %}**, then follow the prompts to authorize your account. + + If you **don't see the prompt**, try restarting {% data variables.product.prodname_vscode_shortname %}. + +If you ever need to switch to an account on {% data variables.product.prodname_dotcom_the_website %}, remove the `authProvider` setting from `settings.json`. + +{% endvscode %} + +{% jetbrains %} + +## Authenticating from JetBrains IDEs + +To authenticate to {% data variables.enterprise.data_residency_site %} in a JetBrains editor, you must install version 1.4.11 or later of the {% data variables.product.prodname_copilot_short %} extension. You must then configure the extension to work with {% data variables.enterprise.data_residency_site %}. + +1. To open the editor preferences or settings dialog, press Command+, (Mac) or Ctrl+Alt+S (Windows). +1. In the left sidebar, expand the "Languages & Frameworks" section, then click **{% data variables.product.prodname_copilot %}**. +1. In the "Authentication Provider" field, enter the hostname where you access {% data variables.product.github %}. For example: `{% data variables.enterprise.data_residency_example_domain %}`. +1. To save your changes, click **OK**. +1. To sign in, open the **Tools** menu, then select **{% data variables.product.prodname_copilot %}** > **Login to {% data variables.product.github %}**. Follow the prompts to sign in. + +If you ever need to switch to an account on {% data variables.product.prodname_dotcom_the_website %}, remove the value you entered in the "Authentication Provider" field. + +{% endjetbrains %} + +{% xcode %} + +## Authenticating from Xcode + +{% data reusables.copilot.xcode-beta-note %} + +1. Open the "{% data variables.product.prodname_copilot %} for Xcode" application. +1. Click the **Advanced** tab. +1. In the "Auth provider URL" field, enter the URL where you access {% data variables.product.github %}. For example: `https://{% data variables.enterprise.data_residency_example_domain %}`. +1. Authorize the extension by following the instructions in "[Signing in to {% data variables.product.prodname_copilot %}](/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment?tool=xcode#signing-in-to-github-copilot)." + +{% endxcode %} + +{% cli %} + +## Authenticating from the command line + +To use the `gh-copilot` extension for the {% data variables.product.prodname_cli %}, you must: + +1. Download and install the extension. To do this, you must be authenticated to an account on {% data variables.product.prodname_dotcom_the_website %}. See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/installing-github-copilot-in-the-cli#installing-copilot-in-the-cli)." +1. Authenticate to the account on {% data variables.enterprise.data_residency_site %} where you receive your {% data variables.product.prodname_copilot_short %} license. + +{% data variables.product.prodname_dotcom_the_website %} is the default destination of {% data variables.product.prodname_cli %} requests. To use `gh copilot`, you must ensure requests are sent to {% data variables.enterprise.data_residency_site %}, where you receive your license. You have the following options: +* Include the flag `--hostname SUBDOMAIN.ghe.com` in all `gh copilot` commands. +* Set the `GH_HOST` environment variable to change the default host for all {% data variables.product.prodname_cli %} commands. +* Sign out of {% data variables.product.prodname_dotcom_the_website %} with `gh auth logout`. However, you will need to sign back in to get updates to `gh-copilot`. + +For general information on using the {% data variables.product.prodname_cli %} across platforms, see "[AUTOTITLE](/github-cli/github-cli/using-multiple-accounts)." + +{% endcli %} + +{% visualstudio %} + +## Authenticating from Visual Studio + +To authenticate from Visual Studio, follow the steps in [Add your GitHub accounts to your Visual Studio keychain](https://learn.microsoft.com/en-us/visualstudio/ide/work-with-github-accounts?view=vs-2022#enabling-github-enterprise-accounts) on Microsoft Learn. + +For the "{% data variables.product.prodname_enterprise %} URL" field, enter the URL where you access {% data variables.product.github %}. For example: `https://{% data variables.enterprise.data_residency_example_domain %}`. + +{% endvisualstudio %} diff --git a/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-enterprise.md b/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-enterprise.md index 883a9bda8b87..0c35c464a9c0 100644 --- a/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-enterprise.md +++ b/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-enterprise.md @@ -32,6 +32,8 @@ You may also need to install custom SSL certificates on your users' machines. Se Enable {% data variables.product.prodname_copilot_short %} for some or all organizations in your enterprise. See "[AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-access-to-copilot-in-your-enterprise/enabling-copilot-for-organizations-in-your-enterprise)." Each organization owner can then grant {% data variables.product.prodname_copilot_short %} access to some or all of the members of their organization. +If your enterprise is on {% data variables.enterprise.data_residency_site %}, users must perform some additional setup to authenticate to their account from their development environment. See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom)." + ## 5. Share onboarding material * **Share onboarding material:** Share onboarding material with each organization that you granted {% data variables.product.prodname_copilot_short %} access to. See "[AUTOTITLE](/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-organization)." diff --git a/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-organization.md b/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-organization.md index 3524118f5034..b90b104cc318 100644 --- a/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-organization.md +++ b/content/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-organization.md @@ -39,6 +39,8 @@ To help drive adoption of {% data variables.product.prodname_copilot_short %} in Alternatively, you can set up a self-serve workflow using the API. See "[Add teams to the Copilot subscription for an organization](/rest/copilot/copilot-user-management?apiVersion=2022-11-28#add-teams-to-the-copilot-subscription-for-an-organization)" and "[Add users to the Copilot subscription for an organization](/rest/copilot/copilot-user-management?apiVersion=2022-11-28#add-users-to-the-copilot-subscription-for-an-organization)" in the REST API documentation. +If your organization is part of an enterprise on {% data variables.enterprise.data_residency_site %}, users must perform some additional setup to authenticate to their account from their development environment. See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom)." + ## 5. Share onboarding material * **Share onboarding material:** Share onboarding material with each member that you granted {% data variables.product.prodname_copilot_short %} access to. See "[AUTOTITLE](/copilot/setting-up-github-copilot/setting-up-github-copilot-for-yourself)" and "[AUTOTITLE](/copilot/using-github-copilot/best-practices-for-using-github-copilot)." diff --git a/content/copilot/troubleshooting-github-copilot/troubleshooting-common-issues-with-github-copilot.md b/content/copilot/troubleshooting-github-copilot/troubleshooting-common-issues-with-github-copilot.md index c26095db1433..0f3c0f8aee19 100644 --- a/content/copilot/troubleshooting-github-copilot/troubleshooting-common-issues-with-github-copilot.md +++ b/content/copilot/troubleshooting-github-copilot/troubleshooting-common-issues-with-github-copilot.md @@ -19,6 +19,8 @@ We recommend you follow the quickstart guide for {% data variables.product.prodn The {% data variables.product.prodname_copilot %} extension is frequently updated to fix bugs and add new features. It's important to keep your extension up to date because older clients cannot communicate with the {% data variables.product.prodname_copilot %} servers. Update your {% data variables.product.prodname_copilot %} extension on all the machines you have it installed. +{% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom)." + For more information about configuring {% data variables.product.prodname_copilot %} in a supported IDE, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment)." ## {% data variables.product.prodname_copilot %} not working in some files diff --git a/content/copilot/troubleshooting-github-copilot/troubleshooting-issues-with-github-copilot-chat-in-ides.md b/content/copilot/troubleshooting-github-copilot/troubleshooting-issues-with-github-copilot-chat-in-ides.md index 552dc96eb44f..b27edbafdd17 100644 --- a/content/copilot/troubleshooting-github-copilot/troubleshooting-issues-with-github-copilot-chat-in-ides.md +++ b/content/copilot/troubleshooting-github-copilot/troubleshooting-issues-with-github-copilot-chat-in-ides.md @@ -32,6 +32,8 @@ To use {% data variables.product.prodname_copilot_chat %}, make sure you are usi You can use {% data variables.product.prodname_copilot_chat %} in {% data variables.product.prodname_vscode %} and {% data variables.product.prodname_vs %}. You can use the tabs at the top of this article for troubleshooting information relevant to the editor you're using. +{% data reusables.copilot.sign-in-ghecom %} See "[AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom)." + {% vscode %} ### Troubleshooting authentication issues in {% data variables.product.prodname_vscode %} diff --git a/data/reusables/copilot/sign-in-ghecom.md b/data/reusables/copilot/sign-in-ghecom.md new file mode 100644 index 000000000000..482c1f8bb5e1 --- /dev/null +++ b/data/reusables/copilot/sign-in-ghecom.md @@ -0,0 +1 @@ +If you're using a {% data variables.product.prodname_copilot_short %} subscription for a {% data variables.enterprise.prodname_managed_user %} account on {% data variables.enterprise.data_residency_site %}, you'll need to update some settings before you sign in.