diff --git a/assets/images/help/codespaces/settings-sync-config-ok.png b/assets/images/help/codespaces/settings-sync-config-ok.png new file mode 100644 index 0000000000..8e0e0f3e15 Binary files /dev/null and b/assets/images/help/codespaces/settings-sync-config-ok.png differ diff --git a/content/codespaces/codespaces-reference/security-in-github-codespaces.md b/content/codespaces/codespaces-reference/security-in-github-codespaces.md index dafacb2e86..2a55946e4c 100644 --- a/content/codespaces/codespaces-reference/security-in-github-codespaces.md +++ b/content/codespaces/codespaces-reference/security-in-github-codespaces.md @@ -124,4 +124,6 @@ Any additional {% data variables.product.prodname_vscode_shortname %} extensions #### Using Settings Sync -{% data variables.product.prodname_vscode_shortname %}'s Settings Sync can allow potentially malicious content to transfer across devices. If you're creating a codespace for a repository whose contents you do not trust, you should open the codespace in the browser and leave Settings Sync disabled. +{% data variables.product.prodname_vscode_shortname %}'s Settings Sync can allow potentially malicious content to transfer across devices. By default, Settings Sync is disabled for codespaces opened in the browser. If you're creating a codespace for a repository whose contents you do not trust, you should open the codespace in the browser and leave Settings Sync turned off. + +If you have enabled Settings Sync in your user preferences, and want to allow changes to your settings to sync from your codespaces to other instances of {% data variables.product.prodname_vscode_shortname %}, we recommend you add a selected list of trusted repositories, rather than trusting all repositories. When you create codespaces from trusted repositories, changes you make to your settings in the codespaces are synced to your cached settings in the cloud, from which they can transfer to your devices. For more information about managing Settings Sync, see "[AUTOTITLE](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#settings-sync)." \ No newline at end of file diff --git a/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md b/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md index 64fdae5fa4..d8cd4701c5 100644 --- a/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md +++ b/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md @@ -35,29 +35,74 @@ Settings Sync allows you to synchronize configurations such as settings, keyboar {% data reusables.codespaces.about-settings-sync %} -- If you open a codespace in the browser, Settings Sync is always disabled at first. This means the transfer of settings takes place in one direction and at one time only: {% data variables.product.prodname_github_codespaces %} pulls the settings stored in the cloud into the codespace at the point of creation, but any updates you make to the settings in the codespace are not propagated to the cloud, so are not reflected in any other codespaces. Equally, any updates you make to your settings elsewhere are not reflected in your codespace. -- If you open a codespace in the {% data variables.product.prodname_vscode_shortname %} desktop application, Settings Sync remains enabled in the codespace if you have previously enabled it for the application. Any updates you make to your settings are pushed to cloud, so are reflected in new codespaces and any existing codespaces in which Settings Sync is enabled. If you make updates to your settings in other {% data variables.product.prodname_vscode_shortname %} instances where Settings Sync is enabled, these updates are reflected in your codespace. +For example, a common use of Settings Sync would be to sync your settings from your {% data variables.product.prodname_vscode_shortname %} desktop application, which you use for local work, to codespaces you open in the browser. To do this, you would need to do the following things. -If you're working in a codespace where Settings Sync is disabled, you can enable Settings Sync to push changes you have made to your settings to the cloud, or pull in the latest changes to your settings you have made elsewhere. +- Turn on Settings Sync in the desktop application. For more information, see [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync#_turning-on-settings-sync) in the {% data variables.product.prodname_vscode_shortname %} documentation. +- Enable Settings Sync in your user preferences for {% data variables.product.prodname_github_codespaces %}. For more information, see "[Managing your preferences for Settings Sync](#managing-your-preferences-for-settings-sync)." +- Optionally, if you want to sync settings changes back to your desktop application from a codespace, turn on Settings Sync in the codespace and add the repository from which you created the codespace to your list of trusted repositories. For more information, see "[Turning on Settings Sync in a codespace](#turning-on-settings-sync-in-a-codespace)." -### Enabling Settings Sync +Alternatively, you may want to use the same settings across all codespaces you open in the web client, while leaving your local {% data variables.product.prodname_vscode_shortname %} application unaffected. To do this, you would need to do the following things. + +- In a codespace, configure your settings as you want them, then turn on Settings Sync in the codespace to push the settings to the cloud. When you do this, Settings Sync is enabled automatically in your user preferences for {% data variables.product.prodname_github_codespaces %}, so your settings will be pulled into all new codespaces. For more information, see "[Turning on Settings Sync in a codespace](#turning-on-settings-sync-in-a-codespace)." +- In the desktop application, leave Settings Sync turned off, or sync your settings to a different account. + +### About Settings Sync in codespaces + +Whether Settings Sync is turned on by default in a codespace, and the relationship between your cached settings and the settings in a codespace, depend on several factors. These factors include the editor in which you open the codespace, your user preferences on {% data variables.product.prodname_dotcom %}, and your list of trusted repositories. + +For codespaces opened in the {% data variables.product.prodname_vscode_shortname %} desktop application, Settings Sync remains on if you have previously turned on Settings Sync in the application. If Settings Sync is on, your settings are synced both to and from the cloud. + +For codespaces opened in the {% data variables.product.prodname_vscode_shortname %} web client, Settings Sync is disabled by default. This means the {% data variables.product.prodname_vscode_shortname %} instance in the codespace uses the default theme and settings. + +If you use the web client and want your codespaces to use your cached synced settings, you can enable Settings Sync in your user preferences on {% data variables.product.prodname_dotcom %}. For more information, see "[Managing your preferences for Settings Sync](#managing-your-preferences-for-settings-sync)." Settings Sync is enabled in your user preferences automatically if you open a codespace in the web client and turn on Settings Sync in the codespace. + +When Settings Sync is enabled in your user preferences, for codespaces opened in the web client, the behavior of Settings Sync depends on your list of trusted repositories. + +- If you create a codespace from a repository you trust, Settings Sync is turned on in the codespace by default, so your settings are synced both to and from the cloud. +- If you create a codespace from a repository you haven't added to your list of trusted repositories, the sync takes place in one direction and at one time only. When you create the codespace, your settings are pulled into the codespace from your cached settings in the cloud, but from then on, Settings Sync is turned off in the codespace. This means updates you make to your settings in the codespace are not pushed back to the cloud, and any updates you make to your cached settings from elsewhere are not reflected in the codespace after you have created it. + + If you turn on Settings Sync in a codespace, you will be prompted to add the repository to your list of trusted repositories. For more information, see "[Turning on Settings Sync in a codespace](#turning-on-settings-sync-in-a-codespace)." + +{% data reusables.codespaces.settings-sync-and-gpg %} + +For more information on managing your preferences for GPG verification, see "[AUTOTITLE](/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces)." + +### Managing your preferences for Settings Sync + +If you enable Settings Sync in your user preferences, codespaces opened in the {% data variables.product.prodname_vscode_shortname %} web client will pull in your cached settings from the cloud, and codespaces created from trusted repositories will sync with your cached settings in both directions. + +{% data reusables.user-settings.access_settings %} +{% data reusables.user-settings.codespaces-tab %} +1. To enable or disable Settings Sync, under "Settings Sync," select or deselect **Enable**. +{% data reusables.codespaces.trusted-repos-step %} + +Your updates will take effect in new codespaces. However, you can turn on Settings Sync in an existing codespace. For more information, see "[Turning on Settings Sync in a codespace](#turning-on-settings-sync-in-a-codespace)." + +### Turning on Settings Sync in a codespace {% note %} -**Note:** You should only enable Settings Sync in codespaces created from repositories you trust. For more information, see "[AUTOTITLE](/codespaces/codespaces-reference/security-in-github-codespaces#using-settings-sync)." +**Note:** You should only turn on Settings Sync in codespaces created from repositories you trust. For more information, see "[AUTOTITLE](/codespaces/codespaces-reference/security-in-github-codespaces#using-settings-sync)." {% endnote %} -1. In {% data variables.product.prodname_vscode_shortname %}, at the bottom of the Activity Bar, select {% octicon "gear" aria-label="The gear icon" %} and click **Turn on Settings Sync…** -1. In the dropdown, select the settings you want to sync. +The following procedure describes how to turn on Settings Sync in a codespace opened in the web client. For information about turning on Settings Sync in the {% data variables.product.prodname_vscode_shortname %} desktop application, see [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync#_turning-on-settings-sync) in the {% data variables.product.prodname_vscode_shortname %} documentation. - ![Screenshot of the "Setting Sync" options. There are seven options, each with a checkbox. The "Sign in & Turn on" button is shown top right.](/assets/images/help/codespaces/codespaces-manage-settings-sync.png) +1. In {% data variables.product.prodname_vscode_shortname %}, at the bottom of the Activity Bar, select {% octicon "gear" aria-label="The gear icon" %}, then click **Sign in to Sync Settings**. +1. If the repository from which you created the codespace is not in your list of trusted repositories, a browser window will open asking you to authorize additional permissions for Settings Sync. If you trust the repository, click **Authorize**, then close the browser window. The codespace will reload and display your latest synced settings. -1. Click **Sign in & Turn on**, then select the account to which you want your settings to be synced. + {% note %} -When you have signed in, the {% data variables.product.prodname_vscode_shortname %} instance you're working in will immediately be updated to display the latest synced settings. + **Note:** If you have Settings Sync disabled in your user preferences, and have set your trusted repositories to all repositories, you will see a warning about enabling Settings Sync for all repositories. Review the warning and choose whether to enable Settings Sync for all repositories or revise your list of trusted repositories. -### Disabling Settings Sync + {% endnote %} + +1. To configure which settings you want to sync, open the Command Palette with Shift+Command+P (Mac) / Ctrl+Shift+P (Windows/Linux), then start typing "Settings Sync". Click **Settings Sync: Configure...**. +1. Select the settings you want to sync, then click **OK**. + + ![Screenshot of the "Setting Sync" options. There are seven options, each with a checkbox. The "OK" button is shown top right.](/assets/images/help/codespaces/settings-sync-config-ok.png) + +### Turning off Settings Sync in a codespace {% data reusables.codespaces.disabling-settings-sync %} diff --git a/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces.md b/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces.md index ea584c5bc4..0064b707f1 100644 --- a/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces.md +++ b/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces.md @@ -16,9 +16,15 @@ redirect_from: shortTitle: GPG verification --- +## About GPG verification in {% data variables.product.prodname_github_codespaces %} +After you enable GPG verification, {% data variables.product.company_short %} will automatically sign commits you make in {% data variables.product.prodname_github_codespaces %}, and the commits will have a verified status on {% data variables.product.product_name %}. For more information about {% data variables.product.product_name %}-signed commits, see "[AUTOTITLE](/authentication/managing-commit-signature-verification/about-commit-signature-verification)." -After you enable GPG verification, {% data variables.product.company_short %} will automatically sign commits you make in {% data variables.product.prodname_github_codespaces %}, and the commits will have a verified status on {% data variables.product.product_name %}. By default, GPG verification is disabled for codespaces you create. You can choose to allow GPG verification for all repositories or specific repositories. Only enable GPG verification for repositories that you trust. For more information about {% data variables.product.product_name %}-signed commits, see "[AUTOTITLE](/authentication/managing-commit-signature-verification/about-commit-signature-verification)." +By default, GPG verification is disabled for codespaces you create. If you enable GPG verification, your commits are signed in repositories that you trust. + +{% data reusables.codespaces.settings-sync-and-gpg %} + +For more information about managing your preferences for Settings Sync, see "[AUTOTITLE](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#managing-your-preferences-for-settings-sync)." {% note %} @@ -26,14 +32,11 @@ After you enable GPG verification, {% data variables.product.company_short %} wi {% endnote %} +## Enabling or disabling GPG verification + {% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %} -1. Under "GPG verification", select the setting you want for GPG verification: - - - **Disabled** - GPG will not be available in your codespaces. - - **All repositories** - GPG will be available for codespaces for all repositories. - - **Selected repositories** - GPG will be available for codespace created from the selected repositories. - -1. If you chose "Selected repositories", select the "Select repositories" dropdown menu, then click a repository you want enable GPG verification for. Repeat this step for all repositories you want to enable GPG verification for. +1. Under "GPG verification," enable or disable GPG verification by selecting or deselecting **Enable**. +{% data reusables.codespaces.trusted-repos-step %} {% data reusables.codespaces.gpg-in-active-codespaces %} diff --git a/data/reusables/codespaces/about-settings-sync.md b/data/reusables/codespaces/about-settings-sync.md index b3225e5891..43cd8dd382 100644 --- a/data/reusables/codespaces/about-settings-sync.md +++ b/data/reusables/codespaces/about-settings-sync.md @@ -1,3 +1 @@ -When you enable Settings Sync in an instance of {% data variables.product.prodname_vscode_shortname %}, such as the {% data variables.product.prodname_vscode_shortname %} desktop application on your laptop, your settings for that instance are stored in the cloud. From the cloud, the settings are pulled into all new codespaces at the point of creation, and continuously synced to any existing codespaces in which Settings Sync is enabled. - -Whether Settings Sync is enabled by default in a codespace depends on your existing settings and on whether you open the codespace in the browser or in the {% data variables.product.prodname_vscode_shortname %} desktop application. +Your synced settings are cached in the cloud. If Settings Sync is turned on in a codespace, any updates you make to your settings in the codespace are pushed to the cloud, and any updates you push to the cloud from elsewhere are pulled into your codespace. \ No newline at end of file diff --git a/data/reusables/codespaces/disabling-settings-sync.md b/data/reusables/codespaces/disabling-settings-sync.md index 4b7304f813..783b104359 100644 --- a/data/reusables/codespaces/disabling-settings-sync.md +++ b/data/reusables/codespaces/disabling-settings-sync.md @@ -1,8 +1,10 @@ -You can disable Settings Sync to stop syncing settings to and from an instance of {% data variables.product.prodname_vscode_shortname %}. +You can turn off Settings Sync to stop syncing settings to and from an instance of {% data variables.product.prodname_vscode_shortname %}. -By default, when you disable Settings Sync, new codespaces continue to use the settings cached from the last time your settings were pushed to the cloud. If your codespaces are still being created with cached settings, and you want to return to using the default {% data variables.product.prodname_vscode_shortname %} settings in your codespaces, you can clear the cache in the cloud when you disable Settings Sync. +When you turn off Settings Sync in a codespace, new codespaces continue to use the settings cached from the last time your settings were pushed to the cloud. If you use the {% data variables.product.prodname_vscode_shortname %} web client for codespaces, and want codespaces to use the default settings instead of your cached settings, you can disable Settings Sync. For more information, see "[Managing your preferences for Settings Sync](#managing-your-preferences-for-settings-sync)." -1. If Settings Sync is currently disabled in your instance of {% data variables.product.prodname_vscode_shortname %}, you must first enable it. For instructions, see "[AUTOTITLE](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#enabling-settings-sync)." +If you want to return to using the default {% data variables.product.prodname_vscode_shortname %} settings in all instances of {% data variables.product.prodname_vscode_shortname %}, including the desktop application, you can clear the cache in the cloud when you turn off Settings Sync. + +1. If Settings Sync is currently turned off in your instance of {% data variables.product.prodname_vscode_shortname %}, and you want to clear your cached settings, you must first turn it on. For instructions, see "[AUTOTITLE](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#turning-on-settings-sync-in-a-codespace)." 1. At the bottom of the Activity Bar, select {% octicon "gear" aria-label="The gear icon" %} and click **Settings Sync is On**. 1. In the dropdown, click **Settings Sync: Turn Off**. diff --git a/data/reusables/codespaces/settings-sync-and-gpg.md b/data/reusables/codespaces/settings-sync-and-gpg.md new file mode 100644 index 0000000000..fa3bbe0639 --- /dev/null +++ b/data/reusables/codespaces/settings-sync-and-gpg.md @@ -0,0 +1,7 @@ +Your list of trusted repositories for {% data variables.product.prodname_github_codespaces %} is shared between the GPG verification and Settings Sync features. Assuming you have both features enabled, if you have added a selected list of trusted repositories for GPG verification, Settings Sync is turned on in codespaces created from these repositories. If you trust a new repository for Settings Sync, GPG verification is enabled for the same repository. Although the features share the same list of trusted repositories, you can enable or disable GPG verification and Settings Sync independently. + +{% note %} + +**Note:** If you have previously enabled GPG verification for all repositories, we recommend changing your preferences to use a selected list of trusted repositories. For more information, see "[AUTOTITLE](/codespaces/codespaces-reference/security-in-github-codespaces#using-settings-sync)." + +{% endnote %} \ No newline at end of file diff --git a/data/reusables/codespaces/trusted-repos-step.md b/data/reusables/codespaces/trusted-repos-step.md new file mode 100644 index 0000000000..7ec8477630 --- /dev/null +++ b/data/reusables/codespaces/trusted-repos-step.md @@ -0,0 +1,7 @@ +1. To change your trusted repositories for GPG verification and Settings Sync, under "Trusted repositories," either select **All repositories**, or select **Selected repositories** and use the "Select repositories" dropdown to add repositories you trust. + + {% note %} + + **Note:** We recommend using a selected list of trusted repositories. For more information, see "[AUTOTITLE](/codespaces/codespaces-reference/security-in-github-codespaces#using-settings-sync)." + + {% endnote %} \ No newline at end of file