New organization for codespaces docs (#18910)
* adding new tables and linking to info on audit logs * editing some text: * adding new info on how to add image registry login * adding link and fixing table * formatting * formatting * Apply suggestions from code review Co-authored-by: Laura Coursen <lecoursen@github.com> * updaing private image registry secret info and other improvements * some minor fixes * fixing test errors * rewriting registry secret section * rewriting registry secret section * updating link to reflect title * Update content/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces.md Co-authored-by: Laura Coursen <lecoursen@github.com> * updating bullet point * moving codespaces to top-level item * fixing duplicated redirect * Adding some organization for contributors * adding learning codespaces to index file * do not error out if category array is empty * Apply suggestions from code review Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com> * fixing broken link * Document choosing machine type for a codespace in the GitHub UI (#19055) * Document choosing machine type in the GitHub UI * Replace link placeholder with actual path * Update content/codespaces/changing-the-machine-type-for-your-codespace.md Co-authored-by: Amy Burns <timeyoutakeit@github.com> Co-authored-by: Amy Burns <timeyoutakeit@github.com> * reoganizing based on CD * putting machine type doc in correct location * fixing broken redirects * removing quickstart example from index page * updating main index file * Fixing broken links * adding intros * adding js quickstart (#18960) * adding js quickstart * clarify walkthrough * adding more images and last few sections * fixing broken links * fixing broken links and formatting * formatting fixes * Apply suggestions from code review Co-authored-by: hubwriter <hubwriter@github.com> * adding index file for learn folder * adding some feedback changes * adding some review comments * fixing broken links Co-authored-by: hubwriter <hubwriter@github.com> * doing some additional re-org * fixing topics * adding Codespaces as a topic * fixing so title matches slug * Update data/reusables/codespaces/codespaces-machine-types.md Co-authored-by: Meg Bird <megbird@github.com> * expanding intro Co-authored-by: Laura Coursen <lecoursen@github.com> Co-authored-by: Sarah Schneider <sarahs@github.com> Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com> Co-authored-by: hubwriter <hubwriter@github.com> Co-authored-by: Meg Bird <megbird@github.com>
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
---
|
||||
title: About billing for Codespaces
|
||||
intro: 'When {% data variables.product.prodname_codespaces %} becomes generally available, you will be billed for storage and compute usage.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
{% data reusables.codespaces.about-billing-for-codespaces %}
|
||||
|
||||
Updates on the billing model for Codespaces will be shared in an upcoming announcement.
|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
title: About Codespaces
|
||||
intro: '{% data variables.product.prodname_codespaces %} is an online development environment, hosted by {% data variables.product.prodname_dotcom %} and powered by {% data variables.product.prodname_vscode %}, that allows you to develop entirely in the cloud.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/about-github-codespaces
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_codespaces %} is currently in limited public beta and subject to change. During the beta period, {% data variables.product.prodname_dotcom %} does not make any guarantees about the availability of {% data variables.product.prodname_codespaces %}. For more information about joining the beta, see "[Joining the beta](/github/developing-online-with-codespaces/about-codespaces#joining-the-beta)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### About {% data variables.product.prodname_codespaces %}
|
||||
|
||||
{% data variables.product.prodname_codespaces %} is a cloud development environment available in your browser. A codespace includes everything you need to develop for a specific repository, including a text editor with syntax highlighting and autocomplete, a terminal, debugging tools, and Git commands, all within {% data variables.product.prodname_dotcom %}. You can also install {% data variables.product.prodname_vscode %} extensions in your codespace to add more functionality.
|
||||
|
||||
{% data variables.product.prodname_codespaces %} makes it easier for developers to onboard to a new company or start contributing to an open-source project. Project maintainers can configure a repository so that, when you create a codespace for the repository, the project's dependencies are included automatically. You can start coding faster by reducing time spent configuring your environment.
|
||||
|
||||
{% data variables.product.prodname_codespaces %} allows you to develop in the cloud instead of locally. Developers can contribute from anywhere, on any machine, including tablets or Chromebooks, and there is no need to maintain local copies of intellectual property.
|
||||
|
||||

|
||||
|
||||
### Using {% data variables.product.prodname_codespaces %}
|
||||
|
||||
Each developer can create one or more codespace for any public repository, or for any private repository owned by their user account. {% data reusables.codespaces.unsupported-repos %} {% data reusables.codespaces.codespaces-are-personal %}
|
||||
|
||||
{% data reusables.codespaces.codespaces-are-per-branch %} {% data reusables.codespaces.concurrent-codespace-limit %} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
|
||||
|
||||
{% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
|
||||
|
||||
{% data reusables.codespaces.about-configuration %} For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
|
||||
|
||||
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
|
||||
|
||||
You can configure settings to add encrypted secrets, enable GPG verification, and allow codespaces to access other repositories. For more information, see "[Managing encrypted secrets for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces)", "[Managing GPG verification for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-gpg-verification-for-codespaces)", and "[Managing access and security for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces)."
|
||||
|
||||
{% data reusables.codespaces.you-can-see-all-your-codespaces %}
|
||||
|
||||
{% data reusables.codespaces.beta-functionality-limited %}
|
||||
|
||||
### About billing for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
{% data reusables.codespaces.about-billing-for-codespaces %} For more information, see "[About billing for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/about-billing-for-codespaces)."
|
||||
|
||||
### Joining the beta
|
||||
|
||||
A limited number of people will be invited to join the beta. To join the waitlist, see [Sign up for Codespaces beta](https://github.com/features/codespaces/signup).
|
||||
|
||||
### Contacting us about {% data variables.product.prodname_codespaces %}
|
||||
|
||||
If you encounter problems using {% data variables.product.prodname_codespaces %}, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
|
||||
|
||||
If you still need help or have feedback about {% data variables.product.prodname_codespaces %}, use the [Codespaces Feedback](https://github.com/github/feedback/discussions/categories/codespaces-feedback) discussion.
|
||||
@@ -1,99 +0,0 @@
|
||||
---
|
||||
title: Configuring Codespaces for your project
|
||||
intro: You can set up a default configuration for every new codespace for your repository to ensure that contributors have all the tools and settings they need in their online development environment.
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
permissions: People with write permissions to a repository can create or edit the default codespace configuration.
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/configuring-github-codespaces-for-your-project
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
### About default codespace configurations
|
||||
|
||||
{% data reusables.codespaces.about-configuration %}
|
||||
|
||||
If you don't define a configuration in your repository, {% data variables.product.prodname_dotcom %} creates a codespace with a base Linux image. The base Linux image includes tools for Python, Node.js, JavaScript, TypeScript, C++, Java, C#, F#, .NET Core, PHP, PowerShell, Go, Ruby, and Rust. For more information about the base Linux image, see the [`microsoft/vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers/tree/master/containers/codespaces-linux) repository.
|
||||
|
||||
{% data reusables.codespaces.about-personalization %} {% data reusables.codespaces.codespace-config-order %} For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
|
||||
|
||||
You can create a default codespace configuration using a pre-built container configuration for your project type, or you can create a custom configuration specific to your project's needs.
|
||||
|
||||
{% data variables.product.prodname_codespaces %} uses settings contained in a configuration file named `devcontainer.json`. {% data reusables.codespaces.devcontainer-location %}
|
||||
|
||||
Each new codespace created from a branch that contains the `.devcontainer` folder will be configured according to the folder's contents. For more information, see "[Creating a codespace](/github/developing-online-with-codespaces/creating-a-codespace)."
|
||||
|
||||
You can use your `devcontainer.json` to set default settings for the entire codespace environment, including the {% data variables.product.prodname_vscode %} editor, but you can also set editor-specific settings in a file named `.vscode/settings.json`.
|
||||
|
||||
### Using a pre-built container configuration
|
||||
|
||||
Pre-built container definitions include a common configuration for a particular project type, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode %} settings, and {% data variables.product.prodname_vscode %} extensions that should be installed.
|
||||
|
||||
1. Access the command palette (`shift command P` / `shift control P`), then start typing "Codespaces: Add Development Container Configuration Files...". Click **Codespaces: Add Development Container Configuration Files...**
|
||||

|
||||
1. Click the definition you want to use.
|
||||

|
||||
1. Follow the prompts to customize your definition.
|
||||
1. Click **OK**.
|
||||

|
||||
1. To apply the changes, in the bottom right corner of the screen, click **Rebuild now**. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-changes-to-your-configuration)."
|
||||

|
||||
|
||||
### Creating a custom codespace configuration
|
||||
|
||||
If none of the pre-built configurations meet your needs, you can create a custom configuration by adding a `devcontainer.json` file. {% data reusables.codespaces.devcontainer-location %}
|
||||
|
||||
In the file, you can use supported configuration keys to specify aspects of the codespace's environment, like which {% data variables.product.prodname_vscode %} extensions will be installed.
|
||||
|
||||
{% data reusables.codespaces.vscode-settings-order %}
|
||||
|
||||
You can define default editor settings for {% data variables.product.prodname_vscode %} in two places.
|
||||
|
||||
* Editor settings defined in `.vscode/settings.json` are applied as _Workspace_-scoped settings in the codespace.
|
||||
* Editor settings defined in the `settings` key in `devcontainer.json` are applied as _Remote [Codespaces]_-scoped settings in the codespace.
|
||||
|
||||
After updating the `devcontainer.json` file, you can rebuild the container for your codespace to apply the changes. For more information, see "[Applying changes to your configuration](#applying-changes-to-your-configuration)."
|
||||
|
||||
### Supported codespace configuration keys
|
||||
|
||||
You can use configuration keys supported by {% data variables.product.prodname_codespaces %} in `devcontainer.json`.
|
||||
|
||||
#### General settings
|
||||
|
||||
- `name`
|
||||
- `settings`
|
||||
- `extensions`
|
||||
- `forwardPorts`
|
||||
- `postCreateCommand`
|
||||
|
||||
#### Docker, Dockerfile, or image settings
|
||||
|
||||
- `image`
|
||||
- `dockerFile`
|
||||
- `context`
|
||||
- `containerEnv`
|
||||
- `remoteEnv`
|
||||
- `containerUser`
|
||||
- `remoteUser`
|
||||
- `mounts`
|
||||
- `runArgs`
|
||||
- `overrideCommand`
|
||||
- `dockerComposeFile`
|
||||
|
||||
For more information about the available settings for `devcontainer.json`, see [devcontainer.json reference](https://aka.ms/vscode-remote/devcontainer.json) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
|
||||
### Applying changes to your configuration
|
||||
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %}
|
||||
|
||||
1. {% data reusables.codespaces.rebuild-command %}
|
||||

|
||||
1. {% data reusables.codespaces.recovery-mode %} Fix the errors in the configuration.
|
||||

|
||||
- To diagnose the error by reviewing the creation logs, click **View creation log**.
|
||||
- To fix the errors identified in the logs, update your `devcontainer.json` file.
|
||||
- To apply the changes, rebuild your container. {% data reusables.codespaces.rebuild-command %}
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
title: Creating a codespace
|
||||
intro: You can create a codespace for a branch in a repository to develop online.
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
permissions: 'Anyone can create a codespace for any public repository, or for any repository owned by their user account.'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/creating-a-codespace
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
### About codespace creation
|
||||
|
||||
{% data reusables.codespaces.codespaces-are-personal %}
|
||||
|
||||
{% data reusables.codespaces.codespaces-are-per-branch %} {% data reusables.codespaces.concurrent-codespace-limit %} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
|
||||
|
||||
{% data reusables.codespaces.unsupported-repos %}
|
||||
|
||||
You cannot create a codespace in an empty repository. If your repository is empty, create a file in the repository before creating a codespace. For more information, see "[Adding a file to a repository](/github/managing-files-in-a-repository/adding-a-file-to-a-repository)" and "[Adding a file to a repository using the command line](/github/managing-files-in-a-repository/adding-a-file-to-a-repository-using-the-command-line)."
|
||||
|
||||
The environment of the codespace you create will be based on the repository's configuration. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
|
||||
|
||||
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
|
||||
|
||||
{% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
{% data reusables.codespaces.you-can-see-all-your-codespaces %}
|
||||
|
||||
### Creating a codespace
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. Under the repository name, use the "Branch" drop-down menu, and select the branch you want to create a codespace for.
|
||||

|
||||
3. Under the repository name, use the {% octicon "download" aria-label="The download icon" %} **Code** drop-down menu, and select **Open with Codespaces**.
|
||||

|
||||
4. If you already have a codespace for the branch, click {% octicon "plus" aria-label="The plus icon" %} **New codespace**.
|
||||

|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Deleting a codespace
|
||||
intro: You can delete a codespace you no longer need.
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
permissions: Anyone can delete a codespace owned by their user account.
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/deleting-a-codespace
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
{% data reusables.codespaces.concurrent-codespace-limit %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-codespaces %}
|
||||
2. To the right of the codespace you want to delete, click **Delete**.
|
||||

|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
title: Developing in a codespace
|
||||
intro: 'You can open a codespace on {% data variables.product.product_name %}, then develop using {% data variables.product.prodname_vscode %}''s features.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
permissions: Anyone can develop in a codespace owned by their user account.
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/developing-in-a-codespace
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
### About development with {% data variables.product.prodname_codespaces %}
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
{% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
{% data reusables.codespaces.about-port-forwarding %} For more information, see "[Forwarding ports in your codespace](/github/developing-online-with-codespaces/forwarding-ports-in-your-codespace)."
|
||||
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %} For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)."
|
||||
|
||||
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
|
||||
|
||||
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
|
||||
|
||||
### Navigating to your codespace
|
||||
|
||||
{% data reusables.codespaces.navigate-to-codespaces %}
|
||||
2. Click the name of the codespace you want to develop in.
|
||||

|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
title: Forwarding ports in your codespace
|
||||
intro: '{% data reusables.codespaces.about-port-forwarding %}'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
### About forwarded ports
|
||||
|
||||
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on port 4000, you can access the application from your browser to test and debug the application.
|
||||
|
||||
When an application running inside a codespace outputs a port to the console, {% data variables.product.prodname_codespaces %} detects the localhost URL pattern and automatically forwards the port. You can click on the URL in the terminal to open the port in a browser. For example, if an application outputs `http://127.0.0.1:4000` or `http://localhost:4000` to the console, the log would automatically convert the output to a clickable URL for port 4000.
|
||||
|
||||

|
||||
|
||||
You can also forward a port manually, label forwarded ports, share fowarded ports publicly, and add forwarded ports to the codespace configuration.
|
||||
|
||||
### Forwarding a port
|
||||
|
||||
You can manually forward a port that wasn't forwarded automatically.
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Under the list of ports, click **Add port**.
|
||||

|
||||
1. Type the port number or address, then press enter.
|
||||

|
||||
|
||||
### Labeling a port
|
||||
|
||||
You can label a port to make the port more easily identifiable in a list.
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Hover over the port you want to label, then click the label icon.
|
||||

|
||||
{% data reusables.codespaces.type-port-label %}
|
||||
|
||||
### Sharing a port
|
||||
|
||||
If you want to share a forwarded port with others, you can make the port public. After you make a port public, anyone with the port's URL can view the running application without needing to authenticate.
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Right click the port you want to share, then click **Make Public**.
|
||||

|
||||
1. To the right of the local address for the port, click the copy icon.
|
||||

|
||||
1. Send the copied URL to the person you want to share the port with.
|
||||
|
||||
### Adding a port to the codespace configuration
|
||||
|
||||
You can add a forwarded port to the {% data variables.product.prodname_codespaces %} configuration for the repository, so the port will automatically be forwarded for all codespaces created from the repository. After you update the configuration, any previously created codespaces must be rebuilt for the change to apply. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces#applying-changes-to-your-configuration)."
|
||||
|
||||
You can manually configure fowarded ports in a `.devcontainer.json` file using the `forwardPorts` property, or you can use the "Ports" panel in your codespace.
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Right click the port you want to add to the codespace configuration, then click **Set Label and Update devcontainer.json**.
|
||||

|
||||
{% data reusables.codespaces.type-port-label %}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: 'Developing online with {% data variables.product.prodname_codespaces %}'
|
||||
shortTitle: Codespaces
|
||||
intro: 'You can develop entirely in the cloud using {% data variables.product.prodname_codespaces %}, an integrated development environment (IDE) on {% data variables.product.prodname_dotcom %}.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
### Table of Contents
|
||||
|
||||
{% link_in_list /about-codespaces %}
|
||||
{% link_in_list /about-billing-for-codespaces %}
|
||||
{% link_in_list /configuring-codespaces-for-your-project %}
|
||||
{% link_in_list /creating-a-codespace %}
|
||||
{% link_in_list /developing-in-a-codespace %}
|
||||
{% link_in_list /forwarding-ports-in-your-codespace %}
|
||||
{% link_in_list /personalizing-codespaces-for-your-account %}
|
||||
{% link_in_list /managing-encrypted-secrets-for-codespaces %}
|
||||
{% link_in_list /managing-access-and-security-for-codespaces %}
|
||||
{% link_in_list /managing-gpg-verification-for-codespaces %}
|
||||
{% link_in_list /deleting-a-codespace %}
|
||||
{% link_in_list /troubleshooting-your-codespace %}
|
||||
{% link_in_list /using-codespaces-in-visual-studio-code %}
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: Managing access and security for Codespaces
|
||||
intro: You can manage the repositories that codespaces can access.
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Access and security for {% data variables.product.prodname_codespaces %} is currently in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Managing security and access for your user account
|
||||
|
||||
When you enable access and security for a repository owned by your user account, any codespaces you create for that repository will have read and write permissions to all other repositories you own. You can enable access and security for none of your repositories, all of your repositories, or specific repositories. You should only enable access and security for repositories you trust.
|
||||
|
||||
{% data reusables.user_settings.access_settings %}
|
||||
{% data reusables.user_settings.codespaces-tab %}
|
||||
1. Under "Access and security", select the setting you want for your user account.
|
||||

|
||||
1. If you chose "Selected repositories", select the drop-down menu, then click a repository to allow the repository's codespaces to access other repositories you own. Repeat for all repositories whose codespaces you want to access other repositories you own.
|
||||

|
||||
|
||||
### Reviewing your security log for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
The security log is where you can review {% data variables.product.prodname_codespaces %} actions that you have performed. For information about accessing the log, see "[Reviewing your security log](/github/authenticating-to-github/reviewing-your-security-log#accessing-your-security-log)."
|
||||
|
||||
The security log includes details on what action occured and when you performed it. For information about {% data variables.product.prodname_codespaces %} actions, see "[{% data variables.product.prodname_codespaces %} category actions](/github/authenticating-to-github/reviewing-your-security-log#codespaces-category-actions)".
|
||||
|
||||
### Managing security and access for your organization
|
||||
|
||||
Organization owners can manage security and access for {% data variables.product.prodname_codespaces %}.
|
||||
|
||||
When you enable access and security for a repository owned by your organization, any codespaces that are created for that repository will have read and write permissions to all other repositories the organization owns. You can enable access and security for none of your organization's repositories, all of your organization's repositories, or specific repositories. You should only enable access and security for repositories you trust.
|
||||
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
{% data reusables.organizations.click-codespaces %}
|
||||
5. To approve of the [pre-release program terms of service](/github/site-policy/github-pre-release-program) on behalf of your organization and enable {% data variables.product.prodname_codespaces %}, under "User permissions", select **Selected users**, then type the username for each person to grant access to. Repeat for all users who you want to have access to your organization's codespaces.
|
||||

|
||||
1. Under "Access and security", select the setting you want for your organization.
|
||||

|
||||
1. If you chose "Selected repositories", select the drop-down menu, then click a repository to allow the repository's codespaces to access other repositories owned by your organization. Repeat for all repositories whose codespaces you want to access other repositories.
|
||||

|
||||
|
||||
### Reviewing your organization's audit logs for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
The audit log is where you can review actions related to {% data variables.product.prodname_codespaces %} that have been performed by members of your organization. For information about accessing the log, see "[Reviewing your security log](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log)."
|
||||
|
||||
The audit log includes details such as who performed the action, what the action was, and when the action was performed. For information on {% data variables.product.prodname_codespaces %} actions, see "[{% data variables.product.prodname_codespaces %} category actions](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#codespaces-category-actions)."
|
||||
@@ -1,89 +0,0 @@
|
||||
---
|
||||
title: Managing encrypted secrets for Codespaces
|
||||
intro: 'You can store sensitive information, like tokens, that you want to access in your codespaces via environment variables.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Encrypted secrets for {% data variables.product.prodname_codespaces %} is currently in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
|
||||
### About encrypted secrets for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
You can add encrypted secrets to your user account that you want to use in your codespaces. For example, you may want to store and access the following sensitive information as encrypted secrets.
|
||||
|
||||
- Personal access tokens to cloud services
|
||||
- Service principals
|
||||
- Subscription identifiers
|
||||
- [Credentials for a private image registry](#allowing-your-codespace-to-access-private-images)
|
||||
|
||||
You can choose which repositories should have access to each secret. Then, you can use the secret in any codespace you create for a repository that has access to the secret.
|
||||
|
||||
### Adding a secret
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Tokens starting with GITHUB_ are reserved
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.user_settings.access_settings %}
|
||||
{% data reusables.user_settings.codespaces-tab %}
|
||||
1. To the right of "Codespaces secrets", click **New secret**.
|
||||

|
||||
1. Under "Name", type a name for your secret.
|
||||

|
||||
{% data reusables.user_settings.codespaces-secret-value %}
|
||||
{% data reusables.user_settings.codespaces-secret-repository-access %}
|
||||
1. Click **Add secret**.
|
||||
|
||||
### Editing a secret
|
||||
|
||||
You can update the value of an existing secret, and you can change which repositories can access a secret.
|
||||
|
||||
{% data reusables.user_settings.access_settings %}
|
||||
{% data reusables.user_settings.codespaces-tab %}
|
||||
1. Under "Codespaces secrets", to the right of the secret you want to edit, click **Update**.
|
||||

|
||||
1. Under "Value", click **enter a new value**.
|
||||

|
||||
{% data reusables.user_settings.codespaces-secret-value %}
|
||||
{% data reusables.user_settings.codespaces-secret-repository-access %}
|
||||
1. Optionally, to remove the secret's access to a repository, deselect the repository.
|
||||

|
||||
1. Click **Save changes**.
|
||||
|
||||
### Deleting a secret
|
||||
|
||||
{% data reusables.user_settings.access_settings %}
|
||||
{% data reusables.user_settings.codespaces-tab %}
|
||||
1. Under "Codespaces secrets", to the right of the secret you want to delete, click **Delete**.
|
||||

|
||||
1. Read the warning, then click **OK**.
|
||||

|
||||
|
||||
### Allowing your codespace to access private images
|
||||
|
||||
A registry is a secure space for storing and managing private container images, such as Azure Container Registry or DockerHub. By adding a secret, your codespace can access private images within the registry.
|
||||
|
||||
When a codespace launches, {% data variables.product.prodname_codespaces %} will check for the following three secrets, which define the server name, username, and personal access token (PAT) for the container registry. If those secrets are found, {% data variables.product.prodname_codespaces %} will make the registry available inside your codespace.
|
||||
|
||||
- `<*>_CONTAINER_REGISTRY_SERVER`
|
||||
- `<*>_CONTAINER_REGISTRY_USER`
|
||||
- `<*>_CONTAINER_REGISTRY_PASSWORD`
|
||||
|
||||
Use the steps in "[Adding a secret](#adding-a-secret)" to add a secret for each of these items. Replace the “<*>” in the name with a consistent identifier. For example, if you had a private image registry in Azure, it might look like the following:
|
||||
|
||||
```
|
||||
ACR_CONTAINER_REGISTRY_SERVER = mycompany.azurecr.io
|
||||
ACR_CONTAINER_REGISTRY_USER = acr-user-here
|
||||
ACR_CONTAINER_REGISTRY_PASSWORD = <PAT>
|
||||
```
|
||||

|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: Managing GPG verification for Codespaces
|
||||
intro: 'You can allow {% data variables.product.company_short %} to automatically use GPG to sign commits you make in your codespaces, so other people can be confident that the changes come from a trusted source.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** GPG verification for {% data variables.product.prodname_codespaces %} is currently in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
After you enable GPG verification, {% data variables.product.company_short %} will automatically sign commits you make in {% data variables.product.prodname_codespaces %}, and the commits will have a verified status on {% data variables.product.product_name %}. By default, GPG verification is disabled for codespaces you create. You can choose to allow GPG verification for all repositories or specific repositories. Only enable GPG verification for repositories that you trust. For more information about {% data variables.product.product_name %}-signed commits, see "[About commit signature verification](/github/authenticating-to-github/about-commit-signature-verification)."
|
||||
|
||||
{% data reusables.user_settings.access_settings %}
|
||||
{% data reusables.user_settings.codespaces-tab %}
|
||||
1. Under "GPG verification", select the setting you want for GPG verification.
|
||||

|
||||
1. If you chose "Selected repositories", select the drop-down menu, then click a repository you want enable GPG verification for. Repeat for all repositories you want to enable GPG verification for.
|
||||

|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
title: Personalizing Codespaces for your account
|
||||
intro: '{% data variables.product.prodname_codespaces %} uses your `dotfiles` repository on {% data variables.product.product_name %} to personalize every new codespace that you create.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
permissions: 'Anyone can create a `dotfiles` repository to personalize {% data variables.product.prodname_codespaces %} for their user account.'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/personalizing-github-codespaces-for-your-account
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
Dotfiles are files and folders on Unix-like systems starting with `.` that control the configuration of applications and shells on your system. You can store and manage your dotfiles in a repository on {% data variables.product.prodname_dotcom %}. For advice and tutorials about what to include in your `dotfiles` repository, see [GitHub does dotfiles](https://dotfiles.github.io/).
|
||||
|
||||
If your user account on {% data variables.product.prodname_dotcom %} owns a public repository named `dotfiles`, {% data variables.product.prodname_dotcom %} automatically uses this repository to personalize your codespace environment. Private `dotfiles` repositories are not currently supported.
|
||||
|
||||
Your `dotfiles` repository might include your shell aliases and preferences, any tools you want to install, or any other codespace personalization you want to make.
|
||||
|
||||
Codespace personalization using your `dotfiles` repository applies to any codespace you create. Project maintainers can also define a default configuration that applies to every codespace for a repository, created by anyone. {% data reusables.codespaces.codespace-config-order %} For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
|
||||
|
||||
When you create a new codespace, {% data variables.product.prodname_dotcom %} clones your `dotfiles` repository to the codespace environment, and looks for one of the following files to set up the environment.
|
||||
|
||||
* _install.sh_
|
||||
* _install_
|
||||
* _bootstrap.sh_
|
||||
* _bootstrap_
|
||||
* _setup.sh_
|
||||
* _setup_
|
||||
|
||||
If none of these files are found, then any files or folders in `dotfiles` starting with `.` are symlinked to the codespace's `~` or `$HOME` directory.
|
||||
|
||||
Any changes to your `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_ settings for the {% data variables.product.prodname_vscode %} editor 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 "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#creating-a-custom-codespace-configuration)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You can also configure settings for your user account to add encrypted secrets, enable GPG verification, and allow your codespaces to access other repositories. For more information, see "[Managing encrypted secrets for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces)", "[Managing GPG verification for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-gpg-verification-for-codespaces)", and "[Managing access and security for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces)."
|
||||
|
||||
### Further reading
|
||||
|
||||
* "[Creating a new repository](/github/creating-cloning-and-archiving-repositories/creating-a-new-repository)"
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
title: Troubleshooting your codespace
|
||||
intro: You can troubleshoot problems with a codespace by checking for known issues in the `microsoft/vscode` repository.
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/troubleshooting-your-codespace
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
{% data reusables.codespaces.beta-functionality-limited %}
|
||||
|
||||
{% data reusables.codespaces.unsupported-repos %}
|
||||
|
||||
{% data reusables.codespaces.recovery-mode %}
|
||||
|
||||
```
|
||||
This codespace is currently running in recovery mode due to a container error.
|
||||
```
|
||||
|
||||
Review the creation logs, update the configuration as needed, and run the "Rebuild Container" command to retry. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)."
|
||||
|
||||
If you encounter issues while using a browser that is not Chromium-based, try switching to a Chromium-based browser, or check for known issues with your browser in the `microsoft/vscode` repository by searching for issues labeled with the name of your browser, such as[`firefox`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+label%3Afirefox) or [`safari`](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Asafari).
|
||||
|
||||
If you encounter issues while using a Chromium-based browser, you can check if you're experiencing another known issue with {% data variables.product.prodname_vscode %} in the [`microsoft/vscode`](https://github.com/microsoft/vscode/issues) repository.
|
||||
|
||||
If you still need help, you can contact us. For more information, see "[About {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/about-codespaces#contacting-us-about-codespaces)."
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
title: Using Codespaces in Visual Studio Code
|
||||
intro: 'You can develop in your codespace directly in {% data variables.product.prodname_vscode %} by connecting the {% data variables.product.prodname_github_codespaces %} extension with your account on {% data variables.product.product_name %}.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-codespaces/connecting-to-your-codespace-from-visual-studio-code
|
||||
- /github/developing-online-with-codespaces/using-codespaces-in-visual-studio
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
### Prerequisites
|
||||
|
||||
To develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must sign into the {% data variables.product.prodname_github_codespaces %} extension. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode %} October 2020 Release 1.51 or later.
|
||||
|
||||
1. Use the {% data variables.product.prodname_vs %} Marketplace to install the [{% data variables.product.prodname_github_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**.
|
||||

|
||||
3. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**.
|
||||

|
||||
4. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
5. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
|
||||
### Creating a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
After you connect your {% data variables.product.product_name %} account to the {% data variables.product.prodname_github_codespaces %} extension, you can develop in a codespace that you created on {% data variables.product.product_name %} or in {% data variables.product.prodname_vscode %}.
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Click the Add icon, then click **Create New Codespace**.
|
||||

|
||||
3. Type, then click the repository's name you want to develop in.
|
||||

|
||||
4. Click the branch you want to develop on.
|
||||

|
||||
5. Click the instance type you want to develop in.
|
||||

|
||||
### Opening a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Under "Codespaces", click the codespace you want to develop in.
|
||||
3. Click the Connect to Codespace icon.
|
||||

|
||||
|
||||
### Changing the machine type in {% data variables.product.prodname_vscode %}
|
||||
|
||||
You can run your codespace on a choice of three types of machine: Basic, Standard, or Premium. Each of these has a different level of resources and a different billing tier.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.codespaces.about-billing-for-codespaces %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.codespaces.codespaces-machine-types %}
|
||||
|
||||
You can change the machine type of your codespace at any time.
|
||||
|
||||
1. In {% data variables.product.prodname_vscode %}, open the Command Palette (`shift command P` / `shift control P`).
|
||||
2. Search for and select "Codespaces: Change Machine Type."
|
||||

|
||||
3. Click the codespace that you want to change.
|
||||

|
||||
4. Choose the machine type you want to use.
|
||||

|
||||
|
||||
If the codespace is currently running, a message is displayed asking if you would like to restart and reconnect to your codespace now. Click **Yes** if you want to change the machine type used for this codespace immediately. If you click **No**, or if the codespace is not currently running, the change will take effect the next time the codespace restarts.
|
||||
|
||||
### Deleting a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
1. Under "Codespaces", right-click the codespace you want to delete.
|
||||
2. In the drop-down menu, click **Delete Codespace**.
|
||||

|
||||
Reference in New Issue
Block a user