Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #25394

Merged
merged 5 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion components/LinkPreviewPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ export function LinkPreviewPopover() {
// This filters out links that are not internal or in-page
// and the ones that are in-page anchor links next to the headings.
return (
link.href.startsWith(window.location.origin) && !link.classList.contains('heading-link')
link.href.startsWith(window.location.origin) &&
!link.classList.contains('heading-link') &&
!link.href.startsWith('/public/')
)
})

Expand Down
2 changes: 1 addition & 1 deletion content/apps/using-github-apps/about-using-github-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In order to use a {% data variables.product.prodname_github_app %}, you must ins

You may also need to authorize a {% data variables.product.prodname_github_app %} to verify your identity, know what resources you can access, or take actions on your behalf. If you need to authorize the app, the app will prompt you to do so. For more information, see "[AUTOTITLE](/apps/using-github-apps/authorizing-github-apps)."

Occasionally, the {% data variables.product.prodname_github_app %} will request updated permissions. {% data variables.product.company_short %} will notify you when this occurs. In order for the app to continue to function, you will need to review and approve the updated permissions.
Occasionally, the {% data variables.product.prodname_github_app %} will request updated permissions. {% data variables.product.company_short %} will notify you when this occurs. In order for the app to continue to function, you will need to review and approve the updated permissions. For more information, see "[AUTOTITLE](/apps/using-github-apps/approving-updated-permissions-for-a-github-app)."

Before you install or authorize a {% data variables.product.prodname_github_app %}, you should make sure that you trust the app developer. If you no longer use the app, you should suspend or uninstall the app and/or revoke your authorization of the app. For more information, see "[AUTOTITLE](/apps/maintaining-github-apps/suspending-a-github-app-installation)" and "[AUTOTITLE](/apps/using-github-apps/reviewing-your-authorized-integrations)."

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Approving updated permissions for a GitHub App
intro: 'When a {% data variables.product.prodname_github_app %} requests additional permissions, you can review what behavior the permissions will enable and decide whether to approve the permissions.'
versions:
fpt: '*'
ghec: '*'
ghes: '*'
ghae: '*'
shortTitle: Approve new permissions
---

Occasionally, a {% data variables.product.prodname_github_app %} that you have installed will request additional permissions. This may happen if the {% data variables.product.prodname_github_app %} owner wants the app to make additional API requests or respond to additional webhook events. For more information about what different permissions enable a {% data variables.product.prodname_github_app %} to do, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app)."

When a {% data variables.product.prodname_github_app %} requests additional organization or repository permissions, {% data variables.product.company_short %} will notify you if the app is installed on your personal account or on an organization that you own.

You can choose to accept or reject the additional permissions. If you reject the additional permissions, the {% data variables.product.prodname_github_app %} will still retain its current permissions. The {% data variables.product.prodname_github_app %} may not function as expected if you reject the additional permissions.

If the app is authorized but not installed or if the {% data variables.product.prodname_github_app %} only requested additional account permissions, {% data variables.product.company_short %} will not notify you. Instead, the {% data variables.product.prodname_github_app %} will prompt you to reauthorize the app in order to enable the new account permissions. For more information, see "[AUTOTITLE](/apps/using-github-apps/authorizing-github-apps)."
1 change: 1 addition & 0 deletions content/apps/using-github-apps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ children:
- /installing-an-app-in-your-organization
- /authorizing-github-apps
- /reviewing-and-revoking-authorization-of-github-apps
- /approving-updated-permissions-for-a-github-app
- /connecting-with-third-party-applications
---

Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.

{% note %}

**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.

![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)
{% endnote %}

1. Click **Sign in & Turn on**, then select the account to which you want your settings to be synced.
1. To configure which settings you want to sync, open the Command Palette with <kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux), then start typing "Settings Sync". Click **Settings Sync: Configure...**.
1. Select the settings you want to sync, then click **OK**.

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.
![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)

### Disabling Settings Sync
### Turning off Settings Sync in a codespace

{% data reusables.codespaces.disabling-settings-sync %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,27 @@ 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 %}

**Note:** If you have linked a dotfiles repository with {% data variables.product.prodname_github_codespaces %}, the Git configuration in your dotfiles may conflict with the configuration that {% data variables.product.prodname_github_codespaces %} requires to sign commits. For more information, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-gpg-verification-for-github-codespaces)."

{% 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 %}
4 changes: 1 addition & 3 deletions data/reusables/codespaces/about-settings-sync.md
Original file line number Diff line number Diff line change
@@ -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.
Loading