Skip to content

Commit e2c0fd8

Browse files
CopilotSteve-GlassdihydroJenoxideCopilot
authored
Document VS Code settings for GitHub Codespaces with GHE.com data residency (#60560)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Steve-Glass <84886334+Steve-Glass@users.noreply.github.com> Co-authored-by: Jenni C <97056108+dihydroJenoxide@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent e1bb63e commit e2c0fd8

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

content/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,5 @@ Some features on {% data variables.enterprise.data_residency_site %} are current
110110
### {% data variables.product.prodname_github_codespaces %}
111111

112112
{% data variables.product.prodname_github_codespaces %} on {% data variables.enterprise.data_residency_site %} are in {% data variables.release-phases.public_preview %} and are available in all {% data variables.enterprise.data_residency %} regions: EU, Australia, US, and Japan.
113+
114+
To use {% data variables.product.prodname_github_codespaces %} from {% data variables.product.prodname_vscode_shortname %} desktop with an enterprise on {% data variables.enterprise.data_residency_site %}, you must configure the `Github-enterprise: Uri` and `Github > Codespaces: Auth Provider` settings. For more information, see [AUTOTITLE](/codespaces/developing-in-a-codespace/using-github-codespaces-in-visual-studio-code#connecting-to-an-enterprise-on-ghecom).

content/codespaces/developing-in-a-codespace/using-github-codespaces-in-visual-studio-code.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,39 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
4040
1. When you're prompted to specify what you want to authorize, click the **Authorize** button for "{% data variables.product.prodname_dotcom %}."
4141
1. If the authorization page is displayed, click **Authorize Visual-Studio-Code**.
4242

43+
{% ifversion ghec %}
44+
45+
## Connecting to an enterprise on {% data variables.enterprise.data_residency_site %}
46+
47+
If you access {% data variables.product.github %} through a subdomain of {% data variables.enterprise.data_residency_site %}, you must configure the `Github-enterprise: Uri` and `Github > Codespaces: Auth Provider` settings in {% data variables.product.prodname_vscode_shortname %} before you can connect to your codespaces.
48+
49+
1. To open your {% data variables.product.prodname_vscode_shortname %} settings, press <kbd>Command</kbd>+<kbd>,</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>,</kbd> (Windows).
50+
1. In the search bar, search for `enterprise`.
51+
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 %}`.
52+
53+
Alternatively, you can add the following to your `settings.json` file:
54+
55+
```json copy
56+
"github-enterprise.uri": "https://{% data variables.enterprise.data_residency_domain %}"
57+
```
58+
59+
1. In the {% data variables.product.prodname_vscode_shortname %} settings, search for `Codespaces Auth Provider`.
60+
1. For the `Github > Codespaces: Auth Provider` setting, select `github-enterprise` from the dropdown.
61+
62+
Alternatively, you can add the following to your `settings.json` file:
63+
64+
```json copy
65+
"github.codespaces.authProvider": "github-enterprise"
66+
```
67+
68+
1. You will be shown a prompt asking you to sign in. Click **Sign in to {% data variables.product.github %}**, then follow the prompts to authorize your account.
69+
70+
If you **don't see the prompt**, try restarting {% data variables.product.prodname_vscode_shortname %}.
71+
72+
If you ever need to switch back to an account on {% data variables.product.prodname_dotcom_the_website %}, set the `Github > Codespaces: Auth Provider` setting back to its default value and remove the `Github-enterprise: Uri` setting.
73+
74+
{% endif %}
75+
4376
## Creating a codespace in {% data variables.product.prodname_vscode_shortname %}
4477

4578
{% data reusables.codespaces.creating-a-codespace-in-vscode %}

0 commit comments

Comments
 (0)