Fix inconsistent alerts by using the markdown notation - part 2 (#35221)
Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
This commit is contained in:
@@ -22,11 +22,8 @@ For information on choosing a machine type when you create a codespace, see "[AU
|
||||
|
||||
## Changing the machine type
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
|
||||
@@ -68,11 +68,8 @@ If the shell you install isn't detected automatically, you can add a new termina
|
||||
|
||||
You can set a default terminal profile to choose the default shell used for all new terminal windows you open in {% data variables.product.prodname_vscode_shortname %}. The default terminal profile is dependent on your operating system, so you can set a default profile for Linux, if you're using the {% data variables.product.prodname_vscode_shortname %} web client, or for your local operating system, if you're using the desktop application.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Regardless of your default profile, codespaces opened in the web client always open with a `bash` session running initially.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Regardless of your default profile, codespaces opened in the web client always open with a `bash` session running initially.
|
||||
|
||||
{% data reusables.codespaces.access-user-settings %}
|
||||
1. Inside the JSON object, to set the default shell for the relevant operating system, add lines or edit existing lines like the following.
|
||||
@@ -113,11 +110,8 @@ sudo apt-get install -y csh
|
||||
sudo chsh "$(id -un)" --shell "/usr/bin/csh"
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you create a new codespace (for example by using `gh codespace create`), you must wait sufficient time to ensure the script has finished running before you connect to the codespace over SSH. If the script hasn't finished running, you will connect to a default `bash` session.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you create a new codespace (for example by using `gh codespace create`), you must wait sufficient time to ensure the script has finished running before you connect to the codespace over SSH. If the script hasn't finished running, you will connect to a default `bash` session.
|
||||
|
||||
When you have connected to the codespace, for most shells, you can use the command `readlink /proc/$$/exe` to check the correct shell is running.
|
||||
|
||||
|
||||
@@ -25,11 +25,8 @@ There are currently two methods of accessing resources on a private network with
|
||||
|
||||
### Using the GitHub CLI extension to access remote resources
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: The {% data variables.product.prodname_cli %} extension is {% data variables.release-phases.closing_down %} and is no longer supported.
|
||||
|
||||
{% endwarning %}
|
||||
> [!WARNING]
|
||||
> The {% data variables.product.prodname_cli %} extension is {% data variables.release-phases.closing_down %} and is no longer supported.
|
||||
|
||||
The {% data variables.product.prodname_cli %} extension allows you to create a bridge between a codespace and your local machine, so that the codespace can access any remote resource that is accessible from your machine. The codespace uses your local machine as a network gateway to reach those resources. For more information, see "[Using {% data variables.product.prodname_cli %} to access remote resources](https://github.com/github/gh-net#codespaces-network-bridge)."
|
||||
|
||||
|
||||
@@ -34,20 +34,16 @@ Organizations can enable members and outside collaborators to create and use cod
|
||||
{% data reusables.codespaces.when-you-can-create-codespaces %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.codespaces.emus-create-codespaces %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.emus-create-codespaces %}
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.codespaces.starting-new-project-template %} For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-from-a-template)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you use a JetBrains IDE, you can use {% data variables.product.prodname_cli %} to create a codespace. You can then use the JetBrains Gateway application to open the codespace in a JetBrains IDE. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-github-codespaces-in-your-jetbrains-ide)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you use a JetBrains IDE, you can use {% data variables.product.prodname_cli %} to create a codespace. You can then use the JetBrains Gateway application to open the codespace in a JetBrains IDE. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-github-codespaces-in-your-jetbrains-ide)."
|
||||
|
||||
If you create a codespace from a repository, the codespace will be associated with a specific branch, which cannot be empty. You can create more than one codespace per repository or even per branch.
|
||||
|
||||
@@ -107,17 +103,12 @@ If you want to use Git hooks for your codespace, then you should set up hooks us
|
||||
|
||||
The options page may also display the names of one or more secrets that it's recommended you create in your {% data variables.product.prodname_codespaces %} settings. For more information, see "[Recommended secrets](#recommended-secrets)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**
|
||||
|
||||
* You can bookmark the options page to give you a quick way to create a codespace for this repository and branch.
|
||||
* The [https://github.com/codespaces/new](https://github.com/codespaces/new) page provides a quick way to create a codespace for any repository and branch. You can get to this page quickly by typing `codespace.new` into your browser's address bar.
|
||||
* For more information about dev container configuration files, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)."
|
||||
* For more information about machine types, see "[AUTOTITLE](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace#about-machine-types)."
|
||||
* {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * You can bookmark the options page to give you a quick way to create a codespace for this repository and branch.
|
||||
> * The [https://github.com/codespaces/new](https://github.com/codespaces/new) page provides a quick way to create a codespace for any repository and branch. You can get to this page quickly by typing `codespace.new` into your browser's address bar.
|
||||
> * For more information about dev container configuration files, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)."
|
||||
> * For more information about machine types, see "[AUTOTITLE](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace#about-machine-types)."
|
||||
> * {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
1. Click **Create codespace**.
|
||||
|
||||
|
||||
@@ -27,11 +27,10 @@ If you're starting a new project, you can get started with development work quic
|
||||
You can start from a blank template, choose from templates maintained by {% data variables.product.company_short %} for popular technologies such as React or Jupyter Notebook, or launch a codespace from any template repository on {% data variables.product.prodname_dotcom %}.
|
||||
|
||||
{% ifversion ghec %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If you have a {% data variables.enterprise.prodname_managed_user %}, you cannot use {% data variables.product.company_short %}'s public templates for {% data variables.product.prodname_github_codespaces %}, because you can only create codespaces that are owned and paid for by your organization or enterprise. For more information, see "[AUTOTITLE](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts)."
|
||||
> [!NOTE]
|
||||
> If you have a {% data variables.enterprise.prodname_managed_user %}, you cannot use {% data variables.product.company_short %}'s public templates for {% data variables.product.prodname_github_codespaces %}, because you can only create codespaces that are owned and paid for by your organization or enterprise. For more information, see "[AUTOTITLE](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts)."
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
With a blank template, you'll start with an empty directory, with access to cloud-based compute resources and the tools, languages, and runtime environments that come preinstalled with the default dev container image. With other templates, you'll get starter files for the technology you're working with, plus typically some extra files such as a README file, a `.gitignore` file, and dev container configuration files containing some custom environment configuration. For more information on dev containers and the default image, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)."
|
||||
@@ -42,11 +41,8 @@ As an example, if you create a codespace from {% data variables.product.company_
|
||||
|
||||
The files and configuration included in templates are defined in template repositories. The template repository is cloned into your codespace when you create the codespace. After that, the link is severed, and your codespace won't be linked to a remote repository until you publish to one.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** To help people get started with your framework, library, or other project, you can set up a template repository for use with {% data variables.product.prodname_github_codespaces %}. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces)."
|
||||
|
||||
{% endtip %}
|
||||
> [!TIP]
|
||||
> To help people get started with your framework, library, or other project, you can set up a template repository for use with {% data variables.product.prodname_github_codespaces %}. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces)."
|
||||
|
||||
## Creating a codespace from a {% data variables.product.company_short %} template
|
||||
|
||||
@@ -69,11 +65,8 @@ You can create a codespace from any template repository, then publish your work
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.codespaces.use-this-template %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you're a maintainer of the template repository, and want to commit changes to the template repository itself, you should create a codespace from the **{% octicon "code" aria-hidden="true" %} Code** dropdown. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you're a maintainer of the template repository, and want to commit changes to the template repository itself, you should create a codespace from the **{% octicon "code" aria-hidden="true" %} Code** dropdown. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
|
||||
{% data reusables.codespaces.template-codespaces-default-editor %}
|
||||
|
||||
|
||||
@@ -18,11 +18,8 @@ redirect_from:
|
||||
|
||||
{% data variables.product.prodname_dotcom %} sets default environment variables for every codespace. Commands run in codespaces can create, read, and modify environment variables.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Environment variables are case-sensitive.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Environment variables are case-sensitive.
|
||||
|
||||
## List of default environment variables
|
||||
|
||||
|
||||
@@ -27,11 +27,8 @@ You can manually delete a codespace in a variety of ways:
|
||||
|
||||
Use the tabs at the top of this article to display instructions for each of these ways of deleting a codespace.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You can't delete a codespace from within the JetBrains Gateway, or the JetBrains client application, or from within JupyterLab.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You can't delete a codespace from within the JetBrains Gateway, or the JetBrains client application, or from within JupyterLab.
|
||||
|
||||
## Why you should delete unused codespaces
|
||||
|
||||
@@ -50,11 +47,8 @@ There are costs associated with storing codespaces. You should therefore delete
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You may have prebuild codespaces that are consuming additional storage which are not displayed on this dashboard. To delete them, follow the steps for “[Deleting a prebuild configuration](/codespaces/prebuilding-your-codespaces/managing-prebuilds#deleting-a-prebuild-configuration).”
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You may have prebuild codespaces that are consuming additional storage which are not displayed on this dashboard. To delete them, follow the steps for “[Deleting a prebuild configuration](/codespaces/prebuilding-your-codespaces/managing-prebuilds#deleting-a-prebuild-configuration).”
|
||||
|
||||
{% vscode %}
|
||||
|
||||
|
||||
@@ -162,11 +162,8 @@ Copy the address and paste it somewhere for later use.
|
||||
|
||||
1. Copy the token.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Important**: Don't share this access token with anyone.
|
||||
|
||||
{% endnote %}
|
||||
> [!IMPORTANT]
|
||||
> Don't share this access token with anyone.
|
||||
|
||||
1. Exit the SSH session.
|
||||
|
||||
|
||||
@@ -63,11 +63,8 @@ You can open your codespace in JupyterLab from the "Your codespaces" page at [gi
|
||||
|
||||
## Configuring NVIDIA CUDA for your codespace
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: This section only applies to customers who can create codespaces on machines that use a GPU. The ability to choose a machine type that uses a GPU was offered to selected customers during a trial period. This option is not generally available.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> This section only applies to customers who can create codespaces on machines that use a GPU. The ability to choose a machine type that uses a GPU was offered to selected customers during a trial period. This option is not generally available.
|
||||
|
||||
Some software requires you to install NVIDIA CUDA to use your codespace’s GPU. Where this is the case, you can create your own custom configuration, by using a `devcontainer.json` file, and specify that CUDA should be installed. For more information on creating a custom configuration, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#creating-a-custom-dev-container-configuration)."
|
||||
|
||||
|
||||
@@ -52,11 +52,8 @@ You can quickly resume a codespace when you're viewing a repository on {% data v
|
||||
|
||||
Alternatively, if you want to create a new codespace for this branch of the repository, click **Create a new one**.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you don't have an existing codespace for this branch, the page is titled "Create codespace" and a button labeled **Create a new codespace** is displayed.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you don't have an existing codespace for this branch, the page is titled "Create codespace" and a button labeled **Create a new codespace** is displayed.
|
||||
|
||||
You can bookmark the address of this page if you want to get back to it quickly to resume your codespace. Alternatively you can use the address in a link to provide other people with a quick way of creating and resuming their own codespaces for this repository.
|
||||
|
||||
@@ -91,11 +88,8 @@ You can bookmark the address of this page if you want to get back to it quickly
|
||||
|
||||
## Reopening an existing codespace
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.codespaces.using-codespaces-in-vscode %} See "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-github-codespaces-in-visual-studio-code)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.using-codespaces-in-vscode %} See "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-github-codespaces-in-visual-studio-code)."
|
||||
|
||||
1. In the {% data variables.product.prodname_vscode_shortname %} desktop application, open the Command Palette with <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux).
|
||||
1. Type "Codespaces" and select one of the following commands.
|
||||
@@ -128,11 +122,8 @@ You can also access the commands listed above by navigating to the Remote Explor
|
||||
gh codespace code
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You must have {% data variables.product.prodname_vscode_shortname %} installed on your local machine. See "[Setting up {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You must have {% data variables.product.prodname_vscode_shortname %} installed on your local machine. See "[Setting up {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
* To open a codespace in the browser, enter:
|
||||
|
||||
@@ -146,11 +137,8 @@ You can also access the commands listed above by navigating to the Remote Explor
|
||||
gh codespace jupyter
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.codespaces.jupyterlab-installed-in-codespace %}
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.jupyterlab-installed-in-codespace %}
|
||||
|
||||
* To access a codespace from the command line, over SSH, enter:
|
||||
|
||||
|
||||
@@ -58,11 +58,8 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
|
||||
|
||||
{% data reusables.codespaces.codespaces-machine-types %} You can change the machine type of your codespace at any time.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% data reusables.codespaces.changing-machine-type-in-vscode %}
|
||||
|
||||
|
||||
@@ -23,11 +23,8 @@ After installing the JetBrains Gateway, you can set JetBrains as your default ed
|
||||
|
||||
When you work in a codespace, you use the JetBrains thin client application on your local computer. This provides the graphical interface for the full JetBrains IDE of your choice, which runs on the remote virtual machine that hosts your codespace. The thin client is always used, even if the full JetBrains IDE is installed locally. Any local JetBrains IDE settings are imported and used by the thin client.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Only existing codespaces are available in the JetBrains Gateway. You can create codespaces in {% data variables.product.github %}, or by using {% data variables.product.prodname_cli %}. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Only existing codespaces are available in the JetBrains Gateway. You can create codespaces in {% data variables.product.github %}, or by using {% data variables.product.prodname_cli %}. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository)."
|
||||
|
||||
### The JetBrains remote development connection process
|
||||
|
||||
@@ -72,11 +69,8 @@ You must have an existing codespace to connect to, and the virtual machine that
|
||||
|
||||
For more information about the `devcontainer.json` file and the default container image, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: For help with connecting to your codespace over SSH, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-github-codespaces-clients?tool=jetbrains#ssh-connection-issues)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> For help with connecting to your codespace over SSH, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-github-codespaces-clients?tool=jetbrains#ssh-connection-issues)."
|
||||
|
||||
## Setting up the JetBrains Gateway
|
||||
|
||||
|
||||
@@ -63,11 +63,8 @@ The sections below give example commands for each of the available operations.
|
||||
|
||||
For a complete reference of `gh` commands for {% data variables.product.prodname_github_codespaces %}, including details of all available options for each command, see the {% data variables.product.prodname_cli %} online help for "[gh codespace](https://cli.github.com/manual/gh_codespace)." Alternatively, on the command line, use `gh codespace --help` for general help or `gh codespace SUBCOMMAND --help` for help with a specific subcommand.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The `-c CODESPACE_NAME` flag, used with many commands, is optional. If you omit it a list of codespaces is displayed for you to choose from.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> The `-c CODESPACE_NAME` flag, used with many commands, is optional. If you omit it a list of codespaces is displayed for you to choose from.
|
||||
|
||||
### List all of your codespaces
|
||||
|
||||
@@ -148,13 +145,10 @@ To run commands on the remote codespace machine, from your terminal, you can SSH
|
||||
gh codespace ssh -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.codespaces.ssh-server-installed %}
|
||||
|
||||
<br>For more information about the `devcontainer.json` file and the default container image, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.ssh-server-installed %}
|
||||
>
|
||||
> For more information about the `devcontainer.json` file and the default container image, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)."
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} creates a local SSH key automatically to provide a seamless authentication experience. For more information on connecting with SSH, see [`gh codespace ssh`](https://cli.github.com/manual/gh_codespace_ssh).
|
||||
|
||||
@@ -254,11 +248,8 @@ For more information about the creation log, see "[AUTOTITLE](/codespaces/troubl
|
||||
|
||||
You can use the {% data variables.product.prodname_cli %} extension to create a bridge between a codespace and your local machine, so that the codespace can access any remote resource that is accessible from your machine. For more information on using the extension, see "[Using {% data variables.product.prodname_cli %} to access remote resources](https://github.com/github/gh-net#codespaces-network-bridge)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The {% data variables.product.prodname_cli %} extension is currently in {% data variables.release-phases.public_preview %} and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> The {% data variables.product.prodname_cli %} extension is currently in {% data variables.release-phases.public_preview %} and subject to change.
|
||||
|
||||
### Change the machine type of a codespace
|
||||
|
||||
|
||||
@@ -44,11 +44,8 @@ A typical workflow for updating a file using {% data variables.product.prodname_
|
||||
* Commit the change.
|
||||
* Raise a pull request.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** By default, {% data variables.product.prodname_github_codespaces %} uses the HTTPS protocol to transfer data to and from a remote repository, and authenticates with a `GITHUB_TOKEN` configured with read and write access to the repository from which you create the codespace. If you're having issues with authentication, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-authentication-to-a-repository)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> By default, {% data variables.product.prodname_github_codespaces %} uses the HTTPS protocol to transfer data to and from a remote repository, and authenticates with a `GITHUB_TOKEN` configured with read and write access to the repository from which you create the codespace. If you're having issues with authentication, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-authentication-to-a-repository)."
|
||||
|
||||
## About automatic forking
|
||||
|
||||
@@ -60,14 +57,9 @@ If you make a commit from the codespace, or push a new branch, {% data variables
|
||||
|
||||
If you make a commit from the command line, you will see a prompt asking if you would like to proceed with linking your codespace to a new or existing fork. Enter `y` to proceed. If you commit changes from the **Source Control** view in {% data variables.product.prodname_vscode_shortname %}, or from the navigation bar in a JetBrains IDE, your codespace is automatically linked to a fork without you being prompted.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes:**
|
||||
|
||||
* If you delete your fork repository, then any codespaces linked to the fork are deleted, even if you originally created them from the upstream repository.
|
||||
* If you make a commit from the command line and refuse the new fork by entering `n`, you should push your changes from the command line rather than from {% data variables.product.prodname_vscode_shortname %}'s Source Control view. If you use the Source Control view, {% data variables.product.prodname_vscode_shortname %} will still try to create a fork for you on push.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * If you delete your fork repository, then any codespaces linked to the fork are deleted, even if you originally created them from the upstream repository.
|
||||
> * If you make a commit from the command line and refuse the new fork by entering `n`, you should push your changes from the command line rather than from {% data variables.product.prodname_vscode_shortname %}'s Source Control view. If you use the Source Control view, {% data variables.product.prodname_vscode_shortname %} will still try to create a fork for you on push.
|
||||
|
||||
When {% data variables.product.prodname_github_codespaces %} creates a fork, or links your codespace to an existing fork, the following things happen.
|
||||
|
||||
@@ -121,11 +113,8 @@ For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-re
|
||||
|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip**: If someone has recently changed a file on the remote repository, in the branch you switched to, you may not see those changes until you pull the changes into your codespace.
|
||||
|
||||
{% endtip %}
|
||||
> [!TIP]
|
||||
> If someone has recently changed a file on the remote repository, in the branch you switched to, you may not see those changes until you pull the changes into your codespace.
|
||||
|
||||
## Committing your changes
|
||||
|
||||
|
||||
@@ -43,11 +43,8 @@ For more information about Live Share, see "[What is {% data variables.product.p
|
||||
|
||||
1. Send the link in your clipboard to anyone you want to join you in your Live Share session.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Important**: Given the level of access Live Share sessions can provide to guests, you should only share with people you trust, and you should think through the implications of what you are sharing. For more information, see "[Security features of Live Share](https://learn.microsoft.com/en-us/visualstudio/liveshare/reference/security)" in the {% data variables.product.prodname_vs %} documentation.
|
||||
|
||||
{% endnote %}
|
||||
> [!IMPORTANT]
|
||||
> Given the level of access Live Share sessions can provide to guests, you should only share with people you trust, and you should think through the implications of what you are sharing. For more information, see "[Security features of Live Share](https://learn.microsoft.com/en-us/visualstudio/liveshare/reference/security)" in the {% data variables.product.prodname_vs %} documentation.
|
||||
|
||||
## Stopping a Live Share session
|
||||
|
||||
|
||||
@@ -28,11 +28,8 @@ Your codespace can be ephemeral if you need to test something or you can return
|
||||
|
||||
For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository)," "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-from-a-template)," and "[AUTOTITLE](/codespaces/developing-in-a-codespace/opening-an-existing-codespace)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You can create more than one codespace per repository or even per branch. However, there are limits to the number of codespaces you can create, and the number of codespaces you can run at the same time. If you reach the maximum number of codespaces and try to create another, a message is displayed telling you that you must remove an existing codespace before you can create a new one.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You can create more than one codespace per repository or even per branch. However, there are limits to the number of codespaces you can create, and the number of codespaces you can run at the same time. If you reach the maximum number of codespaces and try to create another, a message is displayed telling you that you must remove an existing codespace before you can create a new one.
|
||||
|
||||
### The codespace creation process
|
||||
|
||||
@@ -48,13 +45,10 @@ A [shallow clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-cl
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} uses a Docker container as the development environment. This container is created based on configurations that you can define in a `devcontainer.json` file and, optionally, a Dockerfile. If you create a codespace from {% data variables.product.company_short %}'s blank template, or from a repository with no `devcontainer.json` file, {% data variables.product.prodname_github_codespaces %} uses a default image, which has many languages and runtimes available. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)." For details of what the default image for dev containers includes, see the [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src/universal) repository.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you want to use Git hooks in your codespace and apply anything in the [git template directory](https://git-scm.com/docs/git-init#_template_directory) to your codespace, then you must set up hooks during step 4 after the container is created.
|
||||
|
||||
Since your repository is cloned onto the host VM before the container is created, anything in the [git template directory](https://git-scm.com/docs/git-init#_template_directory) will not apply in your codespace unless you set up hooks in your `devcontainer.json` configuration file using the `postCreateCommand` in step 4. For more information, see "[Step 4: Post-creation setup](#step-4-post-creation-setup)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you want to use Git hooks in your codespace and apply anything in the [git template directory](https://git-scm.com/docs/git-init#_template_directory) to your codespace, then you must set up hooks during step 4 after the container is created.
|
||||
>
|
||||
> Since your repository is cloned onto the host VM before the container is created, anything in the [git template directory](https://git-scm.com/docs/git-init#_template_directory) will not apply in your codespace unless you set up hooks in your `devcontainer.json` configuration file using the `postCreateCommand` in step 4. For more information, see "[Step 4: Post-creation setup](#step-4-post-creation-setup)."
|
||||
|
||||
### Step 3: Connecting to the codespace
|
||||
|
||||
@@ -128,11 +122,8 @@ If you're working in a codespace created from a template, Git is installed by de
|
||||
|
||||
For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-source-control-in-your-codespace)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Commits from your codespace will be attributed to the name and public email configured at https://github.com/settings/profile. A token scoped to the repository, included in the environment as `GITHUB_TOKEN`, and your GitHub credentials will be used to authenticate.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Commits from your codespace will be attributed to the name and public email configured at https://github.com/settings/profile. A token scoped to the repository, included in the environment as `GITHUB_TOKEN`, and your GitHub credentials will be used to authenticate.
|
||||
|
||||
## Personalizing your codespace with extensions or plugins
|
||||
|
||||
|
||||
@@ -41,11 +41,10 @@ If an organization chooses for codespaces to be **organization-owned**, the orga
|
||||
For more information about enabling {% data variables.product.prodname_github_codespaces %} for members and collaborators, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/enabling-or-disabling-github-codespaces-for-your-organization)."
|
||||
|
||||
{% ifversion ghec %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If you own an {% data variables.enterprise.prodname_emu_org %} and do not allow {% data variables.product.prodname_github_codespaces %} to be billed to your organization, members with {% data variables.enterprise.prodname_managed_users %} will not be able to use {% data variables.product.prodname_github_codespaces %}. See "[AUTOTITLE](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts)."
|
||||
> [!NOTE]
|
||||
> If you own an {% data variables.enterprise.prodname_emu_org %} and do not allow {% data variables.product.prodname_github_codespaces %} to be billed to your organization, members with {% data variables.enterprise.prodname_managed_users %} will not be able to use {% data variables.product.prodname_github_codespaces %}. See "[AUTOTITLE](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts)."
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
## About ownership of codespaces
|
||||
@@ -72,11 +71,8 @@ If you change from **user ownership** to **organization ownership**, existing co
|
||||
|
||||
## Choosing who owns and pays for codespaces
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you cannot access the option to make codespaces **organization-owned**, this may be because you have disabled {% data variables.product.prodname_github_codespaces %} for all users in your organization's private{% ifversion ghec %} and internal{% endif %} repositories. See "[About choosing who pays for codespaces](#about-choosing-who-pays-for-codespaces)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you cannot access the option to make codespaces **organization-owned**, this may be because you have disabled {% data variables.product.prodname_github_codespaces %} for all users in your organization's private{% ifversion ghec %} and internal{% endif %} repositories. See "[About choosing who pays for codespaces](#about-choosing-who-pays-for-codespaces)."
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
|
||||
@@ -42,11 +42,10 @@ In addition, to allow users to create codespaces, you must ensure that{% ifversi
|
||||
* Your{% else %} your{% endif %} organization does not have an IP address allow list enabled. For more information, see "[Managing allowed IP addresses for your organization](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}
|
||||
|
||||
{% ifversion fpt %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If you are a verified educator or a teacher, you must enable {% data variables.product.prodname_github_codespaces %} from a {% data variables.product.prodname_classroom %} to use your {% data variables.product.prodname_codespaces %} Education benefit. For more information, see "[AUTOTITLE](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#about-the-codespaces-education-benefit-for-verified-teachers)."
|
||||
> [!NOTE]
|
||||
> If you are a verified educator or a teacher, you must enable {% data variables.product.prodname_github_codespaces %} from a {% data variables.product.prodname_classroom %} to use your {% data variables.product.prodname_codespaces %} Education benefit. For more information, see "[AUTOTITLE](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#about-the-codespaces-education-benefit-for-verified-teachers)."
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
## About changing your settings
|
||||
@@ -59,11 +58,8 @@ Once a user loses access to a codespace, the codespace is retained for a period
|
||||
|
||||
## Enabling or disabling {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you remove a user's access to {% data variables.product.prodname_github_codespaces %}, the user will immediately be unable to open existing codespaces they have created from your organization's private {% ifversion ghec %}and internal {% endif %}repositories. For more information, see "[About changing your settings](#about-changing-your-settings)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you remove a user's access to {% data variables.product.prodname_github_codespaces %}, the user will immediately be unable to open existing codespaces they have created from your organization's private {% ifversion ghec %}and internal {% endif %}repositories. For more information, see "[About changing your settings](#about-changing-your-settings)."
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
|
||||
@@ -41,11 +41,8 @@ To list all of the current codespaces for an organization that were created by a
|
||||
gh codespace list --org ORGANIZATION --user USER
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: In the above commands, replace `ORGANIZATION` with the name of the organization you are querying. You must be an owner of the organization.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> In the above commands, replace `ORGANIZATION` with the name of the organization you are querying. You must be an owner of the organization.
|
||||
|
||||
### Using the REST API to list codespaces
|
||||
|
||||
|
||||
@@ -32,11 +32,8 @@ You can set a spending limit for {% data variables.product.prodname_github_codes
|
||||
|
||||
You can check the compute and storage usage for {% data variables.product.prodname_github_codespaces %} for the current billing month. For information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Prebuilds for {% data variables.product.prodname_github_codespaces %} are created and updated using {% data variables.product.prodname_actions %}. This may incur billable costs for {% data variables.product.prodname_actions %}. You can set a spending limit for {% data variables.product.prodname_actions %}. For more information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)" and "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions)." Storage of the generated prebuilds is charged at the same rate as your codespaces, and is included in your {% data variables.product.prodname_github_codespaces %} spending limit.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Prebuilds for {% data variables.product.prodname_github_codespaces %} are created and updated using {% data variables.product.prodname_actions %}. This may incur billable costs for {% data variables.product.prodname_actions %}. You can set a spending limit for {% data variables.product.prodname_actions %}. For more information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)" and "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions)." Storage of the generated prebuilds is charged at the same rate as your codespaces, and is included in your {% data variables.product.prodname_github_codespaces %} spending limit.
|
||||
|
||||
## Disabling or limiting billing for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
@@ -60,11 +57,8 @@ Your users can delete their own codespaces in https://github.com/codespaces and
|
||||
|
||||
As an organization owner, you can delete any codespace in your organization. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace#deleting-codespaces-in-your-organization)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Codespaces are automatically deleted after they have been stopped and have remained inactive for a user-definable number of days. For more information, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces)." As an organization owner, you can set the maximum retention period for codespaces owned by your organization. This will override a user's personal retention setting. For more information, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Codespaces are automatically deleted after they have been stopped and have remained inactive for a user-definable number of days. For more information, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces)." As an organization owner, you can set the maximum retention period for codespaces owned by your organization. This will override a user's personal retention setting. For more information, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)."
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -26,11 +26,8 @@ If there are existing codespaces that no longer conform to a policy you have def
|
||||
|
||||
If you remove higher specification machine types that are required by the {% data variables.product.prodname_github_codespaces %} configuration for an individual repository in your organization, then it won't be possible to create a codespace for that repository. When someone attempts to create a codespace they will see a message telling them that there are no valid machine types available that meet the requirements of the repository's {% data variables.product.prodname_github_codespaces %} configuration.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Anyone who can edit the `devcontainer.json` configuration file in a repository can set a minimum specification for machines that can be used for codespaces for that repository. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/setting-a-minimum-specification-for-codespace-machines)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Anyone who can edit the `devcontainer.json` configuration file in a repository can set a minimum specification for machines that can be used for codespaces for that repository. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/setting-a-minimum-specification-for-codespace-machines)."
|
||||
|
||||
If setting a policy for machine types prevents people from using {% data variables.product.prodname_github_codespaces %} for a particular repository there are two options:
|
||||
|
||||
|
||||
@@ -40,14 +40,10 @@ Using the CLI, the error message is:
|
||||
|
||||
If the image for a codespace is specified in a Dockerfile, and does not match the policy, a codespace is created in recovery mode, using the default recovery container rather than the specified image. A message to this effect is included at the end of the creation log. For more information about the creation log, see "[AUTOTITLE](/codespaces/troubleshooting/github-codespaces-logs#creation-logs)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
* The dev container base image should not be confused with the host image. The host image is the image used to build the virtual machine on which the dev container runs. For more information, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/choosing-the-stable-or-beta-host-image)."
|
||||
* The base image policy is applied when a codespace is created, and when you perform a full container rebuild. For more information, see "[AUTOTITLE](/codespaces/getting-started/understanding-the-codespace-lifecycle#rebuilding-a-codespace)."
|
||||
* The base image policy does not apply to the default image, or the image that's used to recover a codespace if an error is introduced into a dev container configuration which prevents the container from being rebuilt.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * The dev container base image should not be confused with the host image. The host image is the image used to build the virtual machine on which the dev container runs. For more information, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/choosing-the-stable-or-beta-host-image)."
|
||||
> * The base image policy is applied when a codespace is created, and when you perform a full container rebuild. For more information, see "[AUTOTITLE](/codespaces/getting-started/understanding-the-codespace-lifecycle#rebuilding-a-codespace)."
|
||||
> * The base image policy does not apply to the default image, or the image that's used to recover a codespace if an error is introduced into a dev container configuration which prevents the container from being rebuilt.
|
||||
|
||||
### Setting organization-wide and repository-specific policies
|
||||
|
||||
|
||||
@@ -20,11 +20,8 @@ The personal settings of a {% data variables.product.prodname_dotcom %} user all
|
||||
|
||||
As an organization owner, you may want to configure constraints on the maximum idle timeout period for codespaces created for repositories owned by your organization. This can help you to limit costs associated with codespaces that are left to timeout after long periods of inactivity. You can set a maximum timeout for the codespaces for all repositories owned by your organization, or for the codespaces of specific repositories.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Maximum idle timeout constraints only apply to codespaces that are owned by your organization.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Maximum idle timeout constraints only apply to codespaces that are owned by your organization.
|
||||
|
||||
For more information about pricing for {% data variables.product.prodname_github_codespaces %} compute usage, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)."
|
||||
|
||||
|
||||
@@ -45,11 +45,8 @@ Policies with the "Maximum codespaces per user" constraint are applied to every
|
||||
* "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)"
|
||||
* "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)"
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: When you add a constraint to a policy that already contains the "Maximum codespaces per user" constraint, you won't be able to restrict the additional constraint to specific repositories, as the "Maximum codespaces per user" constraint applies to all repositories in the organization.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> When you add a constraint to a policy that already contains the "Maximum codespaces per user" constraint, you won't be able to restrict the additional constraint to specific repositories, as the "Maximum codespaces per user" constraint applies to all repositories in the organization.
|
||||
|
||||
1. After you've finished adding constraints to your policy, click **Save**.
|
||||
|
||||
|
||||
@@ -20,11 +20,8 @@ product: '{% data reusables.gated-features.codespaces-org %}'
|
||||
|
||||
As an organization owner, you may want to configure constraints on the maximum retention period for codespaces created for the repositories owned by your organization. This can help you to limit the storage costs associated with codespaces that are stopped and then left unused until they are automatically deleted. For more information about storage charges, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)." You can set a maximum retention period for all, or for specific, repositories owned by your organization.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Setting a maximum retention policy for a repository prevents people from exempting a codespace from automatic deletion. The "Keep codespace" option will be unavailable for codespaces created for that repository. For more information, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces?tool=webui#avoiding-automatic-deletion-of-codespaces)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Setting a maximum retention policy for a repository prevents people from exempting a codespace from automatic deletion. The "Keep codespace" option will be unavailable for codespaces created for that repository. For more information, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces?tool=webui#avoiding-automatic-deletion-of-codespaces)."
|
||||
|
||||
### Setting organization-wide and repository-specific policies
|
||||
|
||||
@@ -45,14 +42,10 @@ If you add an organization-wide policy with a retention constraint, you should s
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**
|
||||
* A day, in this context, is a 24-hour period, beginning at the time of day when the codespace was stopped.
|
||||
* The valid range is 0-30 days.
|
||||
* Setting the period to `0` will result in codespaces being immediately deleted when they are stopped, or when they timeout due to inactivity.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * A day, in this context, is a 24-hour period, beginning at the time of day when the codespace was stopped.
|
||||
> * The valid range is 0-30 days.
|
||||
> * Setting the period to `0` will result in codespaces being immediately deleted when they are stopped, or when they timeout due to inactivity.
|
||||
|
||||
{% data reusables.codespaces.codespaces-policy-targets %}
|
||||
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see:
|
||||
|
||||
@@ -22,11 +22,8 @@ As an organization owner, you may want to configure constraints on the visibilit
|
||||
|
||||
If there are existing codespaces that no longer conform to a policy you have defined, these codespaces will continue to operate until they are stopped or time out. When the user resumes the codespace, it will be subject to the policy constraints.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You can't disable private port forwarding, as private port forwarding is required by {% data variables.product.prodname_github_codespaces %} to continue working as designed, for example to forward SSH on port 22.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You can't disable private port forwarding, as private port forwarding is required by {% data variables.product.prodname_github_codespaces %} to continue working as designed, for example to forward SSH on port 22.
|
||||
|
||||
### Setting organization-wide and repository-specific policies
|
||||
|
||||
|
||||
@@ -26,11 +26,8 @@ By default, GPG verification is disabled for codespaces you create. If you enabl
|
||||
|
||||
For more information about managing your preferences for Settings Sync, see "[AUTOTITLE](/codespaces/setting-your-user-preferences/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 %}
|
||||
> [!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)."
|
||||
|
||||
## Enabling or disabling GPG verification
|
||||
|
||||
|
||||
@@ -24,11 +24,8 @@ For more information, see "[AUTOTITLE](/codespaces/reference/security-in-github-
|
||||
|
||||
If your project needs additional permissions for other repositories, you can configure this in the `devcontainer.json` file, as described in "[Setting additional repository permissions](#setting-additional-repository-permissions)" later in this article. When permissions are listed in the `devcontainer.json` file, you will be prompted to review and authorize the additional permissions as part of codespace creation for that repository. Once you've authorized the listed permissions, {% data variables.product.prodname_github_codespaces %} will remember your choice and will not prompt you for authorization unless the permissions in the `devcontainer.json` file change.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Updating the permissions in the `devcontainer.json` file does not change the permissions of existing codespaces. If you need additional permissions in an existing codespace, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-authentication-to-a-repository#authenticating-to-repositories-that-you-didnt-create-the-codespace-from)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Updating the permissions in the `devcontainer.json` file does not change the permissions of existing codespaces. If you need additional permissions in an existing codespace, see "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-authentication-to-a-repository#authenticating-to-repositories-that-you-didnt-create-the-codespace-from)."
|
||||
|
||||
## Creating codespaces with custom permissions
|
||||
|
||||
@@ -61,13 +58,9 @@ You configure repository permissions for {% data variables.product.prodname_gith
|
||||
}
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes:**
|
||||
* You can only reference repositories that belong to the same personal account or organization as the repository you are currently working in.
|
||||
* You can use the `*` wildcard to grant permissions to multiple repositories in an organization. For example, to grant permissions to all repositories in the `my_org` organization use `my_org/*`. This syntax is only valid for codespaces. In any `devcontainer.json` files that are used for prebuilds, you must define permissions for each repository separately. For more information, see "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/allowing-a-prebuild-to-access-other-repositories)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * You can only reference repositories that belong to the same personal account or organization as the repository you are currently working in.
|
||||
> * You can use the `*` wildcard to grant permissions to multiple repositories in an organization. For example, to grant permissions to all repositories in the `my_org` organization use `my_org/*`. This syntax is only valid for codespaces. In any `devcontainer.json` files that are used for prebuilds, you must define permissions for each repository separately. For more information, see "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/allowing-a-prebuild-to-access-other-repositories)."
|
||||
|
||||
You can grant as many or as few of the following permissions for each repository listed:
|
||||
* `actions` - read / write
|
||||
|
||||
@@ -26,11 +26,8 @@ When prebuilds are available for a particular branch of a repository, a particul
|
||||
|
||||
When you create a codespace from a template on the "Your codespaces" page, {% data variables.product.prodname_dotcom %} may automatically use a prebuild to speed up creation time. For more information on templates, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-from-a-template)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Each prebuild that's created consumes storage space that will either incur a billable charge or, for repositories owned by your personal {% data variables.product.prodname_dotcom %} account, will use some of your monthly included storage. For more information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Each prebuild that's created consumes storage space that will either incur a billable charge or, for repositories owned by your personal {% data variables.product.prodname_dotcom %} account, will use some of your monthly included storage. For more information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)."
|
||||
|
||||
## The prebuild process
|
||||
|
||||
|
||||
@@ -19,14 +19,9 @@ By default, the {% data variables.product.prodname_actions %} workflow for a pre
|
||||
|
||||
You can configure read access to other {% data variables.product.prodname_dotcom %} repositories, with the same repository owner, by specifying permissions in the `devcontainer.json` file used by your prebuild configuration. For more information, see "[AUTOTITLE](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
|
||||
* You can only authorize read permissions in this way, and the owner of the target repository must be the same as the owner of the repository for which you're creating a prebuild. For example, if you're creating a prebuild configuration for the `octo-org/octocatrepository`, then you'll be able to grant read permissions for other repositories, such `asocto-org/octodemo`, if this is specified in the `devcontainer.json` file, and provided you have the permissions yourself.
|
||||
* You can't use wildcards to specify repositories. You must define permissions for each repository for which you want to grant access.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * You can only authorize read permissions in this way, and the owner of the target repository must be the same as the owner of the repository for which you're creating a prebuild. For example, if you're creating a prebuild configuration for the `octo-org/octocatrepository`, then you'll be able to grant read permissions for other repositories, such `asocto-org/octodemo`, if this is specified in the `devcontainer.json` file, and provided you have the permissions yourself.
|
||||
> * You can't use wildcards to specify repositories. You must define permissions for each repository for which you want to grant access.
|
||||
|
||||
When you create or edit a prebuild configuration for a `devcontainer.json` file that sets up read access to other repositories with the same repository owner, you'll be prompted to grant these permissions when you click **Create** or **Update**. For more information, see "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
|
||||
|
||||
@@ -38,11 +33,9 @@ You will need to create a new personal account and then use this account to crea
|
||||
|
||||
1. Create a new personal account on {% data variables.product.prodname_dotcom %}.
|
||||
|
||||
{% warning %}
|
||||
> [!WARNING]
|
||||
> Although you can generate the {% data variables.product.pat_v1 %} using your existing personal account, we strongly recommend creating a new account with access only to the target repositories required for your scenario. This is because the access token's `repository` permission grants access to all of the repositories that the account has access to. For more information, see "[AUTOTITLE](/get-started/start-your-journey/creating-an-account-on-github)" and "[AUTOTITLE](/actions/security-guides/security-hardening-for-github-actions#considering-cross-repository-access)."
|
||||
|
||||
**Warning**: Although you can generate the {% data variables.product.pat_v1 %} using your existing personal account, we strongly recommend creating a new account with access only to the target repositories required for your scenario. This is because the access token's `repository` permission grants access to all of the repositories that the account has access to. For more information, see "[AUTOTITLE](/get-started/start-your-journey/creating-an-account-on-github)" and "[AUTOTITLE](/actions/security-guides/security-hardening-for-github-actions#considering-cross-repository-access)."
|
||||
|
||||
{% endwarning %}
|
||||
1. Give the new account read access to the required repositories. For more information, see "[AUTOTITLE](/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/managing-an-individuals-access-to-an-organization-repository)."
|
||||
1. While signed into the new account, create a {% data variables.product.pat_v1 %} with the `repo` scope. Optionally, if the prebuild will need to download packages from the {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %}, also select the `read:packages` scope. For more information, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)."
|
||||
|
||||
|
||||
@@ -25,11 +25,8 @@ Prebuilds are created using {% data variables.product.prodname_actions %}. As a
|
||||
|
||||
You can set up prebuilds in any repository owned by a personal account. The prebuild will consume storage space that will either incur a billable charge or, for repositories owned by your personal account, will use some of your monthly included storage.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.codespaces.prebuilds-billing-for-forks %} See "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#how-billing-is-handled-for-forked-repositories)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.prebuilds-billing-for-forks %} See "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#how-billing-is-handled-for-forked-repositories)."
|
||||
|
||||
For repositories owned by an organization, you can set up prebuilds if the organization is on a {% data variables.product.prodname_team %} or {% data variables.product.prodname_enterprise %} plan. Additionally, you must have added a payment method and set a spending limit for {% data variables.product.prodname_github_codespaces %} on the organization account or its parent enterprise. See "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces#managing-the-github-codespaces-spending-limit-for-your-organization-account)" and "[AUTOTITLE](/get-started/learning-about-github/githubs-plans)."
|
||||
|
||||
@@ -44,11 +41,8 @@ For repositories owned by an organization, you can set up prebuilds if the organ
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Any branches created from a prebuild-enabled base branch will typically also get prebuilds for the same dev container configuration. For example, if you enable prebuilds for a dev container configuration file on the default branch of the repository, branches based on the default branch will, in most cases, also get prebuilds for the same dev container configuration.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Any branches created from a prebuild-enabled base branch will typically also get prebuilds for the same dev container configuration. For example, if you enable prebuilds for a dev container configuration file on the default branch of the repository, branches based on the default branch will, in most cases, also get prebuilds for the same dev container configuration.
|
||||
|
||||
1. Optionally, in the **Configuration file** dropdown menu that's displayed, choose the `devcontainer.json` configuration file that you want to use for your prebuilds. See "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#devcontainerjson)."
|
||||
|
||||
@@ -61,11 +55,8 @@ For repositories owned by an organization, you can set up prebuilds if the organ
|
||||
* **On configuration change** - With this setting, prebuilds will be updated every time any of the following files is changed:
|
||||
* `.devcontainer/devcontainer.json`
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Prebuild updates are not triggered by changes to `devcontainer.json` files within subdirectories of `.devcontainer`.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Prebuild updates are not triggered by changes to `devcontainer.json` files within subdirectories of `.devcontainer`.
|
||||
|
||||
* The Dockerfile referenced in the `build.dockerfile` property of the `.devcontainer/devcontainer.json` file.
|
||||
|
||||
@@ -81,13 +72,9 @@ For repositories owned by an organization, you can set up prebuilds if the organ
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
* The prebuild in each region incurs individual storage charges. You should, therefore, only enable prebuilds for regions in which you know they'll be used. See "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)."
|
||||
* Developers can set their default region for {% data variables.product.prodname_github_codespaces %}, which can allow you to enable prebuilds for fewer regions. See "[AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-default-region-for-github-codespaces)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * The prebuild in each region incurs individual storage charges. You should, therefore, only enable prebuilds for regions in which you know they'll be used. See "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)."
|
||||
> * Developers can set their default region for {% data variables.product.prodname_github_codespaces %}, which can allow you to enable prebuilds for fewer regions. See "[AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-default-region-for-github-codespaces)."
|
||||
|
||||
1. Optionally, under **Template history**, set the number of prebuild versions to be retained. You can input any number between 1 and 5. The default number of saved versions is 2, which means that only the latest prebuild and the previous version are saved.
|
||||
|
||||
@@ -103,11 +90,8 @@ For repositories owned by an organization, you can set up prebuilds if the organ
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: People will only receive notifications of failed prebuilds if they have enabled notifications for failed Actions workflows in their personal settings. See "[AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#github-actions-notification-options)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> People will only receive notifications of failed prebuilds if they have enabled notifications for failed Actions workflows in their personal settings. See "[AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#github-actions-notification-options)."
|
||||
|
||||
1. Optionally, at the bottom of the page, click **Show advanced options**.
|
||||
|
||||
|
||||
@@ -75,11 +75,8 @@ Disabling the workflow runs for a prebuild configuration is useful if you need t
|
||||
|
||||
## Deleting a prebuild configuration
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You can find a list of the repositories that contain a prebuild by obtaining a copy of your “[usage report](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).”
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You can find a list of the repositories that contain a prebuild by obtaining a copy of your “[usage report](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).”
|
||||
|
||||
Deleting a prebuild configuration also deletes all previously created prebuilds for that configuration. As a result, shortly after you delete a configuration, prebuilds generated by that configuration will no longer be available when you create a new codespace.
|
||||
|
||||
|
||||
@@ -25,8 +25,5 @@ For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-c
|
||||
1. Apply the changes by rebuilding the container. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#applying-configuration-changes-to-a-codespace)."
|
||||
1. After everything looks good, we also recommend creating a new codespace from your test branch to ensure everything is working. You can then commit your changes to your repository's default branch or an active feature branch, triggering an update of the prebuild for that branch.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Creating this codespace will take longer than usual because it will not be created from a prebuild.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Creating this codespace will take longer than usual because it will not be created from a prebuild.
|
||||
|
||||
@@ -18,11 +18,8 @@ Although disaster recovery scenarios are rare occurrences, we recommend that you
|
||||
|
||||
The following guidance provides options on how to handle service disruption to the entire region where your codespace is deployed.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You can reduce the potential impact of service-wide outages by pushing to remote repositories frequently.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You can reduce the potential impact of service-wide outages by pushing to remote repositories frequently.
|
||||
|
||||
## Option 1: Create a new codespace in another region
|
||||
|
||||
@@ -46,8 +43,5 @@ While this option does not configure a development environment for you, it will
|
||||
|
||||
If your repository has a `devcontainer.json`, consider using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in {% data variables.product.prodname_vscode %} to build and attach to a local development container for your repository. The setup time for this option will vary depending on your local specifications and the complexity of your dev container setup. For more information, see "[Developing inside a container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Be sure your local setup meets the [minimum requirements](https://code.visualstudio.com/docs/remote/containers#_system-requirements) before attempting this option.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Be sure your local setup meets the [minimum requirements](https://code.visualstudio.com/docs/remote/containers#_system-requirements) before attempting this option.
|
||||
|
||||
@@ -97,13 +97,10 @@ When you create a codespace from a PR branch from a fork, the token in the codes
|
||||
|
||||
We also further protect you in these scenarios by not injecting any of your codespace secrets into the environment. For more information, see "[AUTOTITLE](/codespaces/managing-your-codespaces/managing-your-account-specific-secrets-for-github-codespaces)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** The scope of the token in the codespace can change if you create a codespace from a fork to which you only have read access, then make a commit or push a new branch in the codespace. In this situation, as with any other repository, {% data variables.product.prodname_github_codespaces %} automatically creates a new fork, or links your codespace to an existing fork owned by your account, and updates the token to have read and write access to the newly linked fork. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-source-control-in-your-codespace#about-automatic-forking)."
|
||||
|
||||
When {% data variables.product.prodname_github_codespaces %} links your codespace to an existing fork, this existing fork can be either a fork of the fork from which you created a codespace, or your own fork of the shared upstream repository.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> The scope of the token in the codespace can change if you create a codespace from a fork to which you only have read access, then make a commit or push a new branch in the codespace. In this situation, as with any other repository, {% data variables.product.prodname_github_codespaces %} automatically creates a new fork, or links your codespace to an existing fork owned by your account, and updates the token to have read and write access to the newly linked fork. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-source-control-in-your-codespace#about-automatic-forking)."
|
||||
>
|
||||
> When {% data variables.product.prodname_github_codespaces %} links your codespace to an existing fork, this existing fork can be either a fork of the fork from which you created a codespace, or your own fork of the shared upstream repository.
|
||||
|
||||
### Additional good practices
|
||||
|
||||
|
||||
@@ -65,11 +65,8 @@ The Dockerfile is a text file that contains the instructions needed to create a
|
||||
|
||||
The Dockerfile for a dev container is typically located in the `.devcontainer` folder, alongside the `devcontainer.json` in which it is referenced.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: As an alternative to using a Dockerfile you can use the `image` property in the `devcontainer.json` file to refer directly to an existing image you want to use. The image you specify here must be allowed by any organization image policy that has been set. See "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces)." If neither a Dockerfile nor an image is found then the default container image is used. See "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> As an alternative to using a Dockerfile you can use the `image` property in the `devcontainer.json` file to refer directly to an existing image you want to use. The image you specify here must be allowed by any organization image policy that has been set. See "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces)." If neither a Dockerfile nor an image is found then the default container image is used. See "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
#### Simple Dockerfile example
|
||||
|
||||
@@ -100,11 +97,8 @@ COPY ./script-in-your-repo.sh /tmp/scripts/script-in-codespace.sh
|
||||
RUN apt-get update && bash /tmp/scripts/script-in-codespace.sh
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: In the above example, the script that's copied to the codespace (`script-in-your-repo.sh`) must exist in your repository.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> In the above example, the script that's copied to the codespace (`script-in-your-repo.sh`) must exist in your repository.
|
||||
|
||||
For more information about Dockerfile instructions, see "[Dockerfile reference](https://docs.docker.com/engine/reference/builder)" in the Docker documentation.
|
||||
|
||||
@@ -130,11 +124,8 @@ If you don't add a dev container configuration to your repository, or if your co
|
||||
|
||||
The default configuration is a good option if you're working on a small project that uses the languages and tools that {% data variables.product.prodname_github_codespaces %} provides.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_dotcom %} does not charge for storage of containers built from the default dev container image. For more information about billing for codespace storage, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage)." {% data reusables.codespaces.check-for-default-image %}
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data variables.product.prodname_dotcom %} does not charge for storage of containers built from the default dev container image. For more information about billing for codespace storage, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage)." {% data reusables.codespaces.check-for-default-image %}
|
||||
|
||||
## Using a predefined dev container configuration
|
||||
|
||||
@@ -174,13 +165,9 @@ If none of the predefined configurations meets your needs, you can create a cust
|
||||
* If you're adding a single `devcontainer.json` file that will be used by everyone who creates a codespace from your repository, create the file within a `.devcontainer` directory at the root of the repository.
|
||||
* If you want to offer users a choice of configuration, you can create multiple custom `devcontainer.json` files, each located within a separate subdirectory of the `.devcontainer` directory.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
* You can't locate your `devcontainer.json` files in directories more than one level below `.devcontainer`. For example, a file at `.devcontainer/teamA/devcontainer.json` will work, but `.devcontainer/teamA/testing/devcontainer.json` will not.
|
||||
* {% data reusables.codespaces.configuration-choice-templates %} See "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * You can't locate your `devcontainer.json` files in directories more than one level below `.devcontainer`. For example, a file at `.devcontainer/teamA/devcontainer.json` will work, but `.devcontainer/teamA/testing/devcontainer.json` will not.
|
||||
> * {% data reusables.codespaces.configuration-choice-templates %} See "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces)."
|
||||
|
||||
If multiple `devcontainer.json` files are found in the repository, they are listed in the **Dev container configuration** dropdown on the codespace creation options page. See "[AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
|
||||
@@ -212,11 +199,8 @@ You can add and edit the supported configuration keys in the `devcontainer.json`
|
||||
|
||||
The `devcontainer.json` file is written using the JSONC (JSON with comments) format. This allows you to include comments within the configuration file. See "[Editing JSON with {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/languages/json#_json-with-comments)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you use a linter to validate the `devcontainer.json` file, make sure it is set to JSONC and not JSON or comments will be reported as errors.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you use a linter to validate the `devcontainer.json` file, make sure it is set to JSONC and not JSON or comments will be reported as errors.
|
||||
|
||||
### Interface settings for {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
|
||||
@@ -20,11 +20,8 @@ If there's a particular file that's useful for people to see when they create a
|
||||
|
||||
The file, or files, you specify are only opened the first time a codespace is opened in the web client. If the person closes the specified files, those files are not automatically reopened the next time that person opens or restarts the codespace.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: This automation only applies to the {% data variables.product.prodname_vscode_shortname %} web client, not to the {% data variables.product.prodname_vscode_shortname %} desktop application, or other supported editors.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> This automation only applies to the {% data variables.product.prodname_vscode_shortname %} web client, not to the {% data variables.product.prodname_vscode_shortname %} desktop application, or other supported editors.
|
||||
|
||||
## Setting files to be opened automatically
|
||||
|
||||
|
||||
@@ -22,11 +22,8 @@ If your project needs a certain level of compute power, you can configure {% dat
|
||||
|
||||
{% data reusables.codespaces.machine-types-for-unpublished-codespaces %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Important:** Access to some machine types may be restricted at the organization level. Typically this is done to prevent people choosing higher resourced machines that are billed at a higher rate. If your repository is affected by an organization-level policy for machine types you should make sure you don't set a minimum specification that would leave no available machine types for people to choose. For more information, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)."
|
||||
|
||||
{% endnote %}
|
||||
> [!IMPORTANT]
|
||||
> Access to some machine types may be restricted at the organization level. Typically this is done to prevent people choosing higher resourced machines that are billed at a higher rate. If your repository is affected by an organization-level policy for machine types you should make sure you don't set a minimum specification that would leave no available machine types for people to choose. For more information, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)."
|
||||
|
||||
## Setting a minimum machine specification
|
||||
|
||||
|
||||
@@ -24,11 +24,8 @@ Recommended secrets are listed at the bottom of the page.
|
||||
|
||||
<img src="/assets/images/help/codespaces/recommended-secrets.png" style="max-height:50rem" alt='Screenshot of the "Create codespace" page with four recommended secrets highlighted with a dark orange outline.' />
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The names of the recommended secrets are only listed on this page when the container configuration on the selected branch specifies these secrets.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> The names of the recommended secrets are only listed on this page when the container configuration on the selected branch specifies these secrets.
|
||||
|
||||
Each recommended secret is displayed in one of three ways:
|
||||
|
||||
|
||||
@@ -66,14 +66,9 @@ For example, the URL `https://codespaces.new/octo-org/octo-repo?quickstart=1` op
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
|
||||
* If the `codespaces.new` URL already contains a query string, add `&quickstart=1` at the end of the query string.
|
||||
* This type of URL will always open a codespace in the {% data variables.product.prodname_vscode_shortname %} web client, even if this is not set as your default editor for {% data variables.product.prodname_github_codespaces %}.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * If the `codespaces.new` URL already contains a query string, add `&quickstart=1` at the end of the query string.
|
||||
> * This type of URL will always open a codespace in the {% data variables.product.prodname_vscode_shortname %} web client, even if this is not set as your default editor for {% data variables.product.prodname_github_codespaces %}.
|
||||
|
||||
If no matching codespaces are found, the page is titled "Create codespace" and a button is displayed for creating a new codespace with matching parameters.
|
||||
|
||||
@@ -81,11 +76,8 @@ This type of URL is useful, for instance, in a README for your repository as it
|
||||
|
||||
## Creating an "Open in {% data variables.product.prodname_github_codespaces %}" badge
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** You can use the "Share a deep link" option to create a Markdown or HTML snippet that includes an "Open in {% data variables.product.prodname_github_codespaces %}" badge with a custom URL. For more information, see "[Configuring more options](#configuring-more-options)."
|
||||
|
||||
{% endtip %}
|
||||
> [!TIP]
|
||||
> You can use the "Share a deep link" option to create a Markdown or HTML snippet that includes an "Open in {% data variables.product.prodname_github_codespaces %}" badge with a custom URL. For more information, see "[Configuring more options](#configuring-more-options)."
|
||||
|
||||
1. Get the URL to the codespace creation page, or the "Resume codespace" page, as described in the previous sections.
|
||||
1. Add the following Markdown to, for example, the `README.md` file of your repository:
|
||||
|
||||
@@ -49,11 +49,8 @@ For guidance on the kinds of files to include, you can look at the starter files
|
||||
|
||||
You can add dev container configuration files to your template repository to customize the development environment for people using your template with {% data variables.product.prodname_github_codespaces %}. You can choose from a list of predefined configuration settings in {% data variables.product.prodname_vscode %}, or you can create a custom configuration by writing your own `devcontainer.json` file. If you don't add configuration files, the default container image will be used. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)" and "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.codespaces.configuration-choice-templates %}
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data reusables.codespaces.configuration-choice-templates %}
|
||||
|
||||
You should configure your dev container with the tools and customization to give users the best experience with your template. For example, in your `devcontainer.json` file:
|
||||
* You can use the `openFiles` property to define a list of files to be opened automatically in the {% data variables.product.prodname_vscode_shortname %} web client when a codespace is created from your template.
|
||||
|
||||
@@ -19,14 +19,9 @@ The VM for a codespace is built using a host image that defines the operating sy
|
||||
|
||||
The stable image is the default selected setting. Changing the setting to the beta host image gives you early access to improvements and new features on the host VM, but may also introduce incompatibilities with your current dev container configuration. This gives you the opportunity to alter your dev container configuration to avoid problems before the beta image is promoted to the stable image. If you do encounter problems with the beta host image, you can switch back to the stable host image at any time.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
|
||||
* It's unlikely you will encounter problems using the beta host image unless your dev container configuration has dependencies on components of the VM host kernel.
|
||||
* The virtual machine host image should not be confused with the dev container image, which provides the environment of your codespace. For more information, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces#overview)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> * It's unlikely you will encounter problems using the beta host image unless your dev container configuration has dependencies on components of the VM host kernel.
|
||||
> * The virtual machine host image should not be confused with the dev container image, which provides the environment of your codespace. For more information, see "[AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces#overview)."
|
||||
|
||||
If you choose to use the beta host image but no beta image is currently available, your codespaces will be built using the stable host image.
|
||||
|
||||
|
||||
@@ -16,11 +16,8 @@ By default, {% data variables.product.prodname_github_codespaces %} are automati
|
||||
|
||||
However, because {% data variables.product.prodname_github_codespaces %} incurs storage charges, you may prefer to reduce the retention period by changing your default period in your personal settings for {% data variables.product.prodname_github_codespaces %}. For more information about storage charges, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Whether or not you have set a personal codespace retention period, it's a good idea to get into the habit of deleting codespaces that you no longer need. See "[AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Whether or not you have set a personal codespace retention period, it's a good idea to get into the habit of deleting codespaces that you no longer need. See "[AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace)."
|
||||
|
||||
Automatic deletion happens irrespective of whether a codespace contains unpushed changes. To prevent automatic deletion of a codespace, just open the codespace again. The retention period is reset every time you connect to a codespace, and the retention countdown restarts when the codespace is stopped.
|
||||
|
||||
@@ -31,11 +28,8 @@ Each codespace has its own retention period. You may, therefore, have codespaces
|
||||
* You created a codespace using {% data variables.product.prodname_cli %} and specified a different retention period.
|
||||
* You created a codespace for an organization-owned repository that has a retention period configured in the organization settings. The ownership of the codespaces you create is shown on the "[Your codespaces](https://github.com/settings/codespaces)" page.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The retention period is specified in days. A day represents a 24-hour period, beginning at the time of day when you stop a codespace.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> The retention period is specified in days. A day represents a 24-hour period, beginning at the time of day when you stop a codespace.
|
||||
|
||||
{% webui %}
|
||||
|
||||
@@ -49,11 +43,8 @@ Each codespace has its own retention period. You may, therefore, have codespaces
|
||||
|
||||
You can set your default retention period between `0` and `30` days.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Setting the period to `0` will result in your codespaces being immediately deleted when you stop them, or when they timeout due to inactivity. See "[AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-timeout-period-for-github-codespaces)."
|
||||
|
||||
{% endwarning %}
|
||||
> [!WARNING]
|
||||
> Setting the period to `0` will result in your codespaces being immediately deleted when you stop them, or when they timeout due to inactivity. See "[AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-timeout-period-for-github-codespaces)."
|
||||
|
||||
1. Click **Save**.
|
||||
|
||||
@@ -73,11 +64,8 @@ When an inactive codespace is approaching the end of its retention period, this
|
||||
|
||||
You may have a codespace that you want to keep for longer than the retention period defined in your personal settings. You can do this by using the "Keep codespace" option. When you select this option, your codespace will be retained indefinitely, until you delete it manually.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The "Keep codespace" option is not available for organization-owned codespaces affected by an organization retention policy.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> The "Keep codespace" option is not available for organization-owned codespaces affected by an organization retention policy.
|
||||
|
||||
Codespaces incur storage costs, or consume your included storage allowance if the codespace is owned by your personal {% data variables.product.prodname_dotcom %} account. You should therefore be aware of the cost implications of storing codespaces indefinitely. See "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage)."
|
||||
|
||||
|
||||
@@ -81,22 +81,16 @@ Your updates will take effect in new codespaces. However, you can turn on Settin
|
||||
|
||||
### Turning on Settings Sync in a codespace
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You should only turn on Settings Sync in codespaces created from repositories you trust. For more information, see "[AUTOTITLE](/codespaces/reference/security-in-github-codespaces#using-settings-sync)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> You should only turn on Settings Sync in codespaces created from repositories you trust. For more information, see "[AUTOTITLE](/codespaces/reference/security-in-github-codespaces#using-settings-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="Manage" %}, 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.
|
||||
|
||||
{% endnote %}
|
||||
> [!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.
|
||||
|
||||
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**.
|
||||
@@ -130,21 +124,15 @@ If none of these files are found, then any files or folders in your selected dot
|
||||
|
||||
Any changes to your selected dotfiles repository will apply only to each new codespace, and do not affect any existing codespace.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Currently, {% data variables.product.prodname_codespaces %} does not support personalizing the User-scoped settings for {% data variables.product.prodname_vscode_shortname %} with your `dotfiles` repository. You can set default Workspace and Remote [Codespaces] settings for a specific project in the project's repository. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#creating-a-custom-dev-container-configuration)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Currently, {% data variables.product.prodname_codespaces %} does not support personalizing the User-scoped settings for {% data variables.product.prodname_vscode_shortname %} with your `dotfiles` repository. You can set default Workspace and Remote [Codespaces] settings for a specific project in the project's repository. For more information, see "[AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#creating-a-custom-dev-container-configuration)."
|
||||
|
||||
### Enabling your dotfiles repository for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
You can use your selected dotfiles repository to personalize your {% data variables.product.prodname_github_codespaces %} environment. Once you choose your dotfiles repository, you can add your scripts, preferences, and configurations to it. You then need to enable your dotfiles from your personal {% data variables.product.prodname_github_codespaces %} settings page.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** Dotfiles have the ability to run arbitrary scripts, which may contain unexpected or malicious code. Before installing a dotfiles repo, we recommend checking scripts to ensure they don't perform any unexpected actions.
|
||||
|
||||
{% endwarning %}
|
||||
> [!WARNING]
|
||||
> Dotfiles have the ability to run arbitrary scripts, which may contain unexpected or malicious code. Before installing a dotfiles repo, we recommend checking scripts to ensure they don't perform any unexpected actions.
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
{% data reusables.user-settings.codespaces-tab %}
|
||||
|
||||
@@ -17,11 +17,8 @@ type: how_to
|
||||
|
||||
A codespace will stop running after a period of inactivity. By default this period is 30 minutes, but you can specify a longer or shorter default timeout period in your personal settings on {% data variables.product.prodname_dotcom %}. The updated setting will apply to any new codespaces you create, or to existing codespaces the next time you start them. You can also specify a timeout when you use {% data variables.product.prodname_cli %} to create a codespace.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Codespaces compute usage is billed for the duration for which a codespace is active. If you're not using a codespace but it remains running, and hasn't yet timed out, you are billed for the total time that the codespace was active, irrespective of whether you were using it. For more information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)."
|
||||
|
||||
{% endwarning %}
|
||||
> [!WARNING]
|
||||
> Codespaces compute usage is billed for the duration for which a codespace is active. If you're not using a codespace but it remains running, and hasn't yet timed out, you are billed for the total time that the codespace was active, irrespective of whether you were using it. For more information, see "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)."
|
||||
|
||||
### Inactivity defined
|
||||
|
||||
|
||||
@@ -20,11 +20,8 @@ You can export your changes in one of several ways, depending on how you created
|
||||
* If you created the codespace from a repository to which you only have read access, you can export your changes to a fork of the repository. {% data variables.product.prodname_github_codespaces %} will create a new fork for you, or link your codespace to an existing fork if you already have one for the repository, and export your changes to a new branch of the fork. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/using-source-control-in-your-codespace#about-automatic-forking)."
|
||||
* If you created the codespace from a template, and have not yet published it, you can publish the codespace to a new repository.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_dotcom %} blocks pushes containing files larger than 100 MiB. If your codespace contains large files you will not be able to export your changes to a branch or fork. For more information, see "[AUTOTITLE](/repositories/working-with-files/managing-large-files/about-large-files-on-github)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> {% data variables.product.prodname_dotcom %} blocks pushes containing files larger than 100 MiB. If your codespace contains large files you will not be able to export your changes to a branch or fork. For more information, see "[AUTOTITLE](/repositories/working-with-files/managing-large-files/about-large-files-on-github)."
|
||||
|
||||
## Exporting changes to a branch
|
||||
|
||||
|
||||
@@ -60,8 +60,5 @@ To use the token to authenticate in your codespace, you have the following optio
|
||||
|
||||
This will store the access token for the specific repository, so you will be able to push to and pull from the repository without overriding the existing credential helper.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you clone in this way, the token will be visible in your Git configuration. You should only use this method when working in a codespace created from a repository you trust, and you should limit the scope of the access token as much as possible.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If you clone in this way, the token will be visible in your Git configuration. You should only use this method when working in a codespace created from a repository you trust, and you should limit the scope of the access token as much as possible.
|
||||
|
||||
@@ -49,11 +49,8 @@ If you still cannot create a codespace for a repository where {% data variables.
|
||||
|
||||
If the creation of a codespace fails, it's likely to be due to a temporary infrastructure issue in the cloud - for example, a problem provisioning a virtual machine for the codespace. A less common reason for failure is if it takes longer than an hour to build the container. In this case, the build is canceled and codespace creation will fail.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** A codespace that was not successfully created is never going to be usable and should be deleted. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace)."
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> A codespace that was not successfully created is never going to be usable and should be deleted. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace)."
|
||||
|
||||
If you create a codespace and the creation fails:
|
||||
|
||||
@@ -63,20 +60,18 @@ If you create a codespace and the creation fails:
|
||||
|
||||
One common scenario where this could happen is if you have a script running that is prompting for user input and waiting for an answer. If this is the case, remove the interactive prompt so that the build can complete non-interactively.
|
||||
|
||||
{% note %}
|
||||
> [!NOTE]
|
||||
> To view the logs during a build:
|
||||
> * **In the browser**, if the initial steps of the build process take more than a few seconds, the "Setting up your codespace" page is displayed. Click **View logs.**
|
||||
>
|
||||
> 
|
||||
>
|
||||
> * **In the {% data variables.product.prodname_vscode_shortname %} desktop application**, click **Building codespace** in the "Setting up remote connection" popup message that's displayed.
|
||||
>
|
||||
> 
|
||||
>
|
||||
> Log messages are printed to the Terminal in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
**Note**: To view the logs during a build:
|
||||
* **In the browser**, if the initial steps of the build process take more than a few seconds, the "Setting up your codespace" page is displayed. Click **View logs.**
|
||||
|
||||

|
||||
|
||||
* **In the {% data variables.product.prodname_vscode_shortname %} desktop application**, click **Building codespace** in the "Setting up remote connection" popup message that's displayed.
|
||||
|
||||

|
||||
|
||||
Log messages are printed to the Terminal in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% endnote %}
|
||||
1. If you have a container that takes a long time to build, consider using prebuilds to speed up codespace creations. For more information, see "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
|
||||
|
||||
## Deleting codespaces
|
||||
|
||||
@@ -73,11 +73,8 @@ If you want to keep automatic GPG verification for {% data variables.product.pro
|
||||
|
||||
For example, if the global `.gitconfig` file on your local machine contains a `gpg.program` value, and you have pushed this file to a dotfiles repository that is linked with {% data variables.product.prodname_github_codespaces %}, then you may want to remove `gpg.program` from this file and set it at the system level on your local machine instead.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Any changes to your dotfiles repository will apply to new codespaces you create, but not to your existing codespaces.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Any changes to your dotfiles repository will apply to new codespaces you create, but not to your existing codespaces.
|
||||
|
||||
1. On your local machine, open a terminal.
|
||||
1. To remove the conflicting value from `~/.gitconfig` (Mac/Linux) or `C:\Users\YOUR-USER\.gitconfig` (Windows), use the `git config --global --unset` command.
|
||||
|
||||
@@ -13,11 +13,8 @@ topics:
|
||||
|
||||
Personal {% data variables.product.prodname_dotcom %} accounts include a quota of free use of {% data variables.product.prodname_github_codespaces %} every month.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Free use of {% data variables.product.prodname_github_codespaces %} is included in personal accounts only. It is not included in organization or enterprise accounts.
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> Free use of {% data variables.product.prodname_github_codespaces %} is included in personal accounts only. It is not included in organization or enterprise accounts.
|
||||
|
||||
There are two types of {% data variables.product.prodname_codespaces %} usage: compute and storage. During your monthly billing period, as you use {% data variables.product.prodname_codespaces %}, your compute and storage usage is deducted from the quota of free usage that's included in your personal {% data variables.product.prodname_dotcom %} account, until either compute or storage is consumed. Once one of those limits is reached, your use of {% data variables.product.prodname_github_codespaces %} will be restricted, unless you've set up a spending limit and a payment method. You will not be able to create new codespaces or open existing codespaces, that you would be billed for, until your quota renews. If you have access to repositories owned by an organization that pays for use of {% data variables.product.prodname_github_codespaces %}, you may still be able to create codespaces for those repositories.
|
||||
|
||||
@@ -35,11 +32,8 @@ You can see the storage usage for each of your codespaces on the "Your codespace
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If the dev container for a codespace was built from the default image, the size of the codespace shown on this page does not include the size of the base dev container. Storage for the base dev container is provided free of charge. See "[Storage usage for your base dev container](#storage-usage-for-your-base-dev-container)".
|
||||
|
||||
{% endnote %}
|
||||
> [!NOTE]
|
||||
> If the dev container for a codespace was built from the default image, the size of the codespace shown on this page does not include the size of the base dev container. Storage for the base dev container is provided free of charge. See "[Storage usage for your base dev container](#storage-usage-for-your-base-dev-container)".
|
||||
|
||||
For billing purposes, {% data variables.product.prodname_codespaces %} storage is counted in GB-months. This is a cumulative measure of the total storage each codespace consumes from creation to deletion, plus the storage for prebuilds. See the "Billing for storage usage" section of "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage)."
|
||||
|
||||
@@ -85,11 +79,10 @@ If the dev container for the current codespace was built from the default image,
|
||||
* Your codespaces consume compute usage while they are running. If you're not using a codespace, stopping the codespace prevents unnecessary compute usage. See "[AUTOTITLE](/codespaces/developing-in-a-codespace/stopping-and-starting-a-codespace)."
|
||||
* You can reduce the idle timeout for {% data variables.product.prodname_codespaces %} in your personal settings to less than the default 30 minutes. This will shorten the period of inactivity before your codespaces are automatically stopped. This can save on compute usage. See "[AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-timeout-period-for-github-codespaces)."
|
||||
* Your codespaces consume storage while they exist. You should delete a codespace you have finished using and know that you will not use again. See "[AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace)."
|
||||
{% note %}
|
||||
|
||||
**Note**: Deleting a codespace will not reduce your used storage amount for the billing current month as this is a cumulative figure.
|
||||
> [!NOTE]
|
||||
> Deleting a codespace will not reduce your used storage amount for the billing current month as this is a cumulative figure.
|
||||
|
||||
{% endnote %}
|
||||
* Configure your retention period to ensure codespaces you forget to delete are deleted automatically. The default retention period is 30 days. See "[AUTOTITLE](/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces)."
|
||||
* {% data variables.product.prodname_vscode %} extensions consume storage. Make sure you are only installing extensions that you need. You can find out how much space is being used by extensions by running this command in your codespace.
|
||||
|
||||
@@ -98,17 +91,15 @@ If the dev container for the current codespace was built from the default image,
|
||||
```
|
||||
|
||||
* Monitor your compute and storage usage by going to your billing page on {% data variables.product.github %}, https://github.com/settings/billing, and reviewing the figures in the "{% data variables.product.prodname_codespaces %}" section.
|
||||
{% note %}
|
||||
|
||||
**Note**: Storage is calculated hourly and added to your existing storage usage. Consumed storage is therefore cumulative for the duration of your month-long billing cycle. This means that, during the billing period, the value you see on your billing page will only increase or remain the same. Usage will be reset to zero when a new billing cycle starts. Deleting a codespace, or a prebuild, will not reduce the usage figure for the current month, but it will reduce the rate at which storage usage accumulates.
|
||||
> [!NOTE]
|
||||
> Storage is calculated hourly and added to your existing storage usage. Consumed storage is therefore cumulative for the duration of your month-long billing cycle. This means that, during the billing period, the value you see on your billing page will only increase or remain the same. Usage will be reset to zero when a new billing cycle starts. Deleting a codespace, or a prebuild, will not reduce the usage figure for the current month, but it will reduce the rate at which storage usage accumulates.
|
||||
|
||||
{% endnote %}
|
||||
* Ensure that you are using prebuilds for only as many versions and as many regions as you need. See "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)" and "[AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds)."
|
||||
{% note %}
|
||||
|
||||
**Note**: If your included storage usage is exhausted, new prebuilds are disabled until you set up a spending limit or your included usage quota renews.
|
||||
> [!NOTE]
|
||||
> If your included storage usage is exhausted, new prebuilds are disabled until you set up a spending limit or your included usage quota renews.
|
||||
|
||||
{% endnote %}
|
||||
* If you have configured prebuilds in a repository's settings, but you're not using {% data variables.product.prodname_github_codespaces %} for that repository, consider deleting the prebuild configuration to avoid prebuilds for that repository consuming your included storage allowance unnecessarily. When you delete a prebuild configuration all the associated prebuilds are deleted, reducing your storage consumption from that point onward. See "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/managing-prebuilds#deleting-a-prebuild-configuration)."
|
||||
|
||||
You can check for prebuild configurations in the "{% data variables.product.prodname_codespaces %}" page of a repository's settings. See "[AUTOTITLE](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
|
||||
|
||||
Reference in New Issue
Block a user