1
0
mirror of synced 2026-01-16 00:01:39 -05:00
This commit is contained in:
Octomerger Bot
2021-08-12 11:32:56 +10:00
committed by GitHub
parent f0c93e860e
commit 297ca63c32
224 changed files with 1605 additions and 622 deletions

View File

@@ -1,19 +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.'
versions:
fpt: '*'
redirect_from:
- /github/developing-online-with-codespaces/about-billing-for-codespaces
- /codespaces/getting-started-with-codespaces/about-billing-for-codespaces
type: reference
topics:
- Codespaces
shortTitle: Billing
---
{% 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.

View File

@@ -1,68 +0,0 @@
---
title: About Codespaces
intro: '{% data variables.product.prodname_codespaces %} is a configurable 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.'
redirect_from:
- /github/developing-online-with-github-codespaces/about-github-codespaces
- /github/developing-online-with-codespaces/about-codespaces
- /codespaces/getting-started-with-codespaces/about-codespaces
- /codespaces/about-codespaces
versions:
fpt: '*'
type: overview
topics:
- Codespaces
---
{% data reusables.codespaces.release-stage %}
## About {% data variables.product.prodname_codespaces %}
{% data variables.product.prodname_codespaces %} is a configurable cloud development environment available in your browser on {% data variables.product.prodname_dotcom %} or through {% data variables.product.prodname_vscode %}.
![An open codespace](/assets/images/help/codespaces/codespace-overview.png)
A codespace includes everything developers need to develop for a specific repository, including the {% data variables.product.prodname_vscode %} editing experience and common languages, tools, and utilities. {% data variables.product.prodname_codespaces %} is completely configurable, allowing you to create a customized development environment for your project, and allowing developers to personalize their experience with extensions and dotfile settings.
Codespaces offers many benefits to teams by allowing for a consistent environment across your entire team, fast onboarding, and creating a secure space for development.
## A consistent environment
You can create a single codespace configuration that defines the environment (or _dev container_) of every new codespace that anyone creates for your repository. Once you've made a configuration, developers dont have to worry about installing the right tools to comment, review, or contribute. A standardized environment is already available for them as soon as they create a codespace from the repository. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
For help getting started with configurations for specific languages, see the [Getting Started](/codespaces/getting-started-with-codespaces) tutorials.
While every codespace created from your repository has a consistent development environment, developers can use {% data variables.product.prodname_codespaces %} wherever they need it on {% data variables.product.prodname_dotcom %} or through {% data variables.product.prodname_vscode %}.
## Fast and personal onboarding
With a [dev container](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project#about-dev-containers) configured in your repository, any new developer can quickly onboard with the correct development environment for your project by using the {% octicon "download" aria-label="The download icon" %} **Code** drop-down menu, and selecting **Open with Codespaces**.
![Open with Codespaces button](/assets/images/help/codespaces/open-with-codespaces-button.png)
As a result of standardizing on a repeatable developer environment, developers can get started with a new codespace without doing any manual configuration and do not need to do continued maintenance of their developer environment. A new codespace can be created when starting a new feature.
Developers can also personalize aspects of their codespace environment by using a [dotfiles](https://dotfiles.github.io/tutorials/) repository and [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync). Personalization can include shell preferences, additional tools, editor settings, and extensions, such as Live Share. Personal customizations are stored on a per-user basis, so every codespace a developer opens has their environment ready to go. For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
Because {% data variables.product.prodname_codespaces %} can be accessed in the browser, developers can work on multiple projects by switching between tabs.
## A secure environment
{% data variables.product.prodname_codespaces %} allows developers to develop in the cloud instead of locally. This creates one single, trackable, source of truth. Developers can contribute from anywhere, on any machine, including tablets or Chromebooks, and there is no need to maintain local copies of intellectual property. Developers always have to be logged in and provided with access to both {% data variables.product.prodname_codespaces %} and specific repositories. These permissions can be revoked at any time. As soon as you revoke access, those developers will lose all access to protected resources. In addition, authenticated developers create audit trails so you know who is doing what. For more information on access and security, see "[Managing access and security for your organization's codespaces](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)."
Using {% data variables.product.prodname_codespaces %} is the most secure when all members of your team are using it. It means that there is no need to clone the repository onto a local machine and that developers don't need to install locally as `root`.
Developers and organization administrators can also configure settings to add encrypted secrets and enable GPG verification. 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)".
## 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 the 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.

View File

@@ -5,11 +5,9 @@ versions:
fpt: '*'
topics:
- Codespaces
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: Private image registry
---
{% data reusables.codespaces.release-stage %}
A registry is a secure space for storing and managing private container images, such as Azure Container Registry or DockerHub. You can create secrets in GitHub to store the access details for a private registry and use them to give your codespace access to images stored in the registry.
When you launch a codespace, {% data variables.product.prodname_codespaces %} checks for three secrets, which define the server name, username, and personal access token (PAT) for a container registry. If these secrets are found, {% data variables.product.prodname_codespaces %} will make the registry available inside your codespace.

View File

@@ -3,8 +3,10 @@ title: Disaster recovery for Codespaces
intro: 'This article describes guidance for a disaster recovery scenario, when a whole region experiences an outage due to major natural disaster or widespread service interruption.'
versions:
free-pro-team: '*'
product: '{% data reusables.gated-features.codespaces %}'
topics:
- Codespaces
shortTitle: Disaster recovery
---
We work hard to make sure that {% data variables.product.prodname_codespaces %} is always available to you. However, forces beyond our control sometimes impact the service in ways that can cause unplanned service disruptions.
@@ -21,19 +23,7 @@ The following guidance provides options on how to handle service disruption to t
## Option 1: Create a new codespace in another region
In the case of a regional outage, we suggest you recreate your codespace in an unaffected region to continue working. This new codespace will have all of the changes as of your last push to {% data variables.product.prodname_dotcom %}.
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.codespaces-tab %}
1. Under "Region", select the "Set manually" option and choose an unaffected region in the dropdown.
![Radio buttons to manage region selection](/assets/images/help/codespaces/codespaces-region-selector-radio-buttons.png)
2. Navigate back to your project's repository, use the {% octicon "download" aria-label="The download icon" %} **Code** drop-down menu and select **Open with Codespaces**.
![Open with Codespaces button](/assets/images/help/codespaces/open-with-codespaces-button.png)
3. Click {% octicon "plus" aria-label="The plus icon" %} **New codespace** to create a new codespace in the specified region and continue working.
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)
In the case of a regional outage, we suggest you recreate your codespace in an unaffected region to continue working. This new codespace will have all of the changes as of your last push to {% data variables.product.prodname_dotcom %}. For information on manaully setting another region, see "[Setting your default region for Codespaces](/codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces)."
You can optimize recovery time by configuring a `devcontainer.json` in the project's repository, which allows you to define the tools, runtimes, frameworks, editor settings, extensions, and other configuration necessary to restore the development environment automatically. For more information, see "[Configuring Codespaces for your project](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project)."
@@ -41,7 +31,7 @@ You can optimize recovery time by configuring a `devcontainer.json` in the proje
In this case, no action on your part is required. Know that we are working diligently to restore service availability.
Check our [{% data variables.product.prodname_discussions %} page](https://github.com/github/feedback/discussions/categories/codespaces-feedback) for any updates on service interruptions. Soon, you'll be able to see the current service status on the [Status Dashboard](https://www.githubstatus.com/).
You can check the current service status on the [Status Dashboard](https://www.githubstatus.com/).
## Option 3: Clone the repository locally or edit in the browser

View File

@@ -3,12 +3,11 @@ title: Reference
intro: 'This section contains references that will allow you to be successful with {% data variables.product.prodname_codespaces %}'
versions:
fpt: '*'
product: '{% data reusables.gated-features.codespaces %}'
children:
- /about-codespaces
- /about-billing-for-codespaces
- /troubleshooting-your-codespace
- /understanding-billing-for-codespaces
- /allowing-your-codespace-to-access-a-private-image-registry
- /using-the-command-palette-in-codespaces
- /security-in-codespaces
- /disaster-recovery-for-codespaces
---
{% data reusables.codespaces.release-stage %}

View File

@@ -0,0 +1,105 @@
---
title: Security in Codespaces
intro: 'Overview of the {% data variables.product.prodname_codespaces %} security architecture, with guidelines to help you maintain security and minimize the risk of attack.'
miniTocMaxHeadingLevel: 3
versions:
fpt: '*'
topics:
- Codespaces
- Security
type: reference
shortTitle: Security in Codespaces
---
## Overview of codespace security
{% data variables.product.prodname_codespaces %} is designed to be security hardened by default. Consequently, you will need to ensure that your software development practices do not risk reducing the security posture of your codespace.
This guide describes the way Codespaces keeps your development environment secure and provides some of the good practices that will help maintain your security as you work. As with any development tool, remember that you should only open and work within repositories you know and trust.
### Environment isolation
{% data variables.product.prodname_codespaces %} is designed to keep your codespaces separate from each other, with each using its own virtual machine and network.
#### Isolated virtual machines
Each codespace is hosted on its own newly-built virtual machine (VM). Two codespaces are never co-located on the same VM.
Every time you restart a codespace, it's deployed to a new VM with the latest available security updates.
#### Isolated networking
Each codespace has its own isolated virtual network. We use firewalls to block incoming connections from the internet and to prevent codespaces from communicating with each other on internal networks. By default, codespaces are allowed to make outbound connections to the internet.
### Authentication
You can connect to a codespace using a web browser or from Visual Studio Code. If you connect from Visual Studio Code, you are prompted to authenticate with {% data variables.product.product_name %}.
Every time a codespace is created or restarted, it's assigned a new {% data variables.product.company_short %} token with an automatic expiry period. This period allows you to work in the codespace without needing to reauthenticate during a typical working day, but reduces the chance that you will leave a connection open when you stop using the codespace.
The token's scope will vary depending on the access you have to the repository where the codespace was created:
- **If you have write access to the repository**: The token will be scoped for read/write access to the repository.
- **If you only have read access to the repository**: The token will only allow the code to be cloned from the source repository. If you attempt to push to a private repo where you only have read access, {% data variables.product.prodname_codespaces %} will prompt you to create a personal fork of the repository. The token will then be updated to have read/write access to the new personal fork.
- **If you've enabled your codespace to access other repositories**: When a codespace has been granted [access to other repositories](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces), any codespace created from that repository will have read/write tokens scoped to the source repository. In addition, the tokens will also receive read access to other repositories indicated by the user or organization.
An organization's administrators specify which repositories should be considered trusted. An admin can [choose to trust](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces) none, all, or some of the organization's repositories. A codespace can't have greater permissions to access resources than the person who created it, even if the organization administrator has granted access to all users and all repositories.
### Codespace connections
You can connect to your codespace using the TLS encrypted tunnel provided by the {% data variables.product.prodname_codespaces %} service. Only the creator of a codespace can connect to a codespace. Connections are authenticated with {% data variables.product.product_name %}.
If you need to allow external access to services running on a codespace, you can enable port forwarding for private or public access.
### Port forwarding
If you need to connect to a service (such as a development web server) running within your codespace, you can configure port forwarding to make the service available on the internet.
**Privately forwarded ports**: Are accessible on the internet, but only the codespace creator can access them, after authenticating to {% data variables.product.product_name %}.
**Publicly forwarded ports**: Are accessible on the internet, and anyone on the internet can access them. No authentication is needed to access public forwarded ports.
All forwarded ports are private by default, which means that you will need to authenticate before you can access the port. Access to a codespace's private forwarded ports is controlled by authentication cookies with a 3-hour expiry period. When the cookie expires, you will need to reauthenticate.
A public forwarded port will automatically revert back to private when you remove and re-add the port, or if you restart the codespace.
You can use the "Ports" panel to configure a port for public or private access, and can stop port forwarding when it's no longer required. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
## Good security practices for your codespaces
Codespaces are designed to be security hardened by default. To help maintain this posture, we recommend that you follow good security practices during your development procedures:
- As with any development tool, remember that you should only open and work within repositories you know and trust.
- Before you add new dependencies to the codespace, check whether they are well-maintained, and if they release updates to fix any security vulnerabilities found in their code.
### Using secrets to access sensitive information
Always use encrypted secrets when you want to use sensitive information (such as access tokens) in a codespace. You can access your secrets as environment variables in the codespace, including from the terminal. For example, you can launch a terminal within your codespace and use `echo $SECRET_NAME ` to see the value of a secret.
The secret values are copied to environment variables whenever the codespace is resumed or created, so if you update a secret value while the codespace is running, youll need to suspend and resume to pick up the updated value.
For more information on secrets, see:
- "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)"
- "[Managing encrypted secrets for your repository and organization for Codespaces](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces)"
### Working with other people's contributions and repositories
When you create a codespace from a PR branch from a fork, the token in the codespace will vary depending on whether the repository is public or private:
- For a private repository, the codespace is granted access to both the fork and parent.
- For a public repository, the codespace will only have access to the fork and opening PRs on the parent.
### Additional good practices
There are some additional good practices and risks that you should be aware of when using {% data variables.product.prodname_codespaces %}.
### Understanding a repository's devcontainer.json file
When creating a codespace, the [devcontainer.json](https://code.visualstudio.com/docs/remote/devcontainerjson-reference) is parsed and applied from the source repo, if one exists. The devcontainer contains powerful features, such as installing third-party extensions and running arbitrary code through a supplied `postCreateCommand`.
#### Granting access through features
Certain development features can potentially add risk to your environment. For example, commit signing, secrets injected into environment variables, authenticated registry access, and packages access can all present potential security issues. We recommend that you only grant access to those who need it and adopt a policy of being as restrictive as possible.
#### Using extensions
Any additional {% data variables.product.prodname_vscode %} extensions that you've installed can potentially introduce more risk. To help mitigate this risk, ensure that the you only install trusted extensions, and that they are always kept up to date.

View File

@@ -1,69 +0,0 @@
---
title: Troubleshooting your codespace
intro: Use this guide to help you troubleshoot common issues with your codespace.
redirect_from:
- /github/developing-online-with-github-codespaces/troubleshooting-your-codespace
- /github/developing-online-with-codespaces/troubleshooting-your-codespace
- /codespaces/working-with-your-codespace/troubleshooting-your-codespace
versions:
fpt: '*'
type: reference
topics:
- Codespaces
shortTitle: Troubleshoot a codespace
---
{% data reusables.codespaces.release-stage %}
## Known Limitations
{% data reusables.codespaces.beta-functionality-limited %}
{% data reusables.codespaces.unsupported-repos %}
## {% data variables.product.prodname_vscode %} troubleshooting
Use **Issues** in the [`microsoft/vscode`](https://github.com/microsoft/vscode/issues) repository to check for known issues or to log issues about the {% data variables.product.prodname_vscode %} experience.
## Configuration troubleshooting
{% 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 **Codespaces: Rebuild Container** in the command palette 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)."
## dotfiles troubleshooting
- Make sure your dotfiles repository is public. If you have secrets or sensitive data you want to use in your codespace, use [Codespace secrets](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces) instead of private dotfiles.
- Check `/workspaces/.codespaces/.persistedshare/dotfiles` to see if your dotfiles were cloned.
- If your dotfiles were cloned, try manually re-running your install script to verify it's executable.
- If your dotfiles weren't cloned, check `/workspaces/.codespaces/.persistedshare/EnvironmentLog.txt` to see if there was a problem cloning them.
- Check `/workspaces/.codespaces/.persistedshare/creation.log` for possible issues. Alternatively, you can view the `creation.log` by navigating to the command palette and entering **Codespaces: View Creation Log**.
## Browser troubleshooting
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.
## Container storage troubleshooting
When you create a codespace, it has a finite amount of storage and over time it may be necessary for you to free up space. Try any of the following items to free up storage space.
- Remove packages that are no longer by using `sudo apt autoremove`
- Clean the apt cache by using `sudo apt clean`
- Delete unneeded files like build artifacts and logs (these are very project-dependent)
- See the top 10 largest files in the codespace: `sudo find / -printf '%s %p\n'| sort -nr | head -10`
More destructive options:
- Remove unused Docker images, networks, and containers by using `docker system prune` (append `-a` if you want to remove all images, and `--volumes` if you want to remove all volumes)
- Remove untracked files from working tree: `git clean -i`
## Contact us
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)."

View File

@@ -0,0 +1,53 @@
---
title: Understanding billing for Codespaces
intro: 'Learn how your {% data variables.product.prodname_codespaces %} usage is billed.'
versions:
fpt: '*'
redirect_from:
- /github/developing-online-with-codespaces/about-billing-for-codespaces
- /codespaces/getting-started-with-codespaces/about-billing-for-codespaces
- /codespaces/codespaces-reference/about-billing-for-codespaces
type: reference
topics:
- Codespaces
- Billing
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: Understanding billing
---
{% data reusables.codespaces.codespaces-trial-period %}
This article explains how billing works for your codespaces, and explains how your organization's billing manager can help.
## Getting access to {% data variables.product.prodname_codespaces %}
Your organization's administrator might limit {% data variables.product.prodname_codespaces %} usage to only specific user accounts. To get access, you will need to contact your billing manager. For more information, see "[Managing access and security for your codespaces](/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces)."
## How spending limits work
Before your organization can use {% data variables.product.prodname_codespaces %}, your billing manager will need to set a spending limit. For more information, see "[Managing billing for Codespaces in your organization](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)."
## How your codespace usage is billed
Your codespace is billed for its compute minutes and for the amount of storage it uses on disk.
### Understanding what compute minutes are
Your codespace is billed for the number of minutes that it's active. If your codespaces window is left idle for 30 minutes, it will automatically shutdown, and compute billing for the codespace will end until you start the codespace again.
### Understanding how codespace storage is billed
For {% data variables.product.prodname_codespaces %}, storage is defined to include any files relating to your codespace, such as the cloned repository, configuration files, and extensions, among others. This storage is billed while your codespace is shutdown. The storage billing for a codespace ends when you manually delete it from https://github.com/codespaces.
## How much it costs to use {% data variables.product.prodname_codespaces %}
To see the pricing for {% data variables.product.prodname_codespaces %} usage, see "[{% data variables.product.prodname_codespaces %} pricing](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)."
## Checking your current usage and limits
If you need to check your current usage or spending limit, contact your organization's billing manager. For more information, see "[Viewing your Codespaces usage](/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage)."
## Codespaces can be automatically deleted
Your codespace will be automatically deleted when you are removed from an organization or repository.
## Deleting your unused codespaces
You can manually delete your codespaces in https://github.com/codespaces and from within {% data variables.product.prodname_vscode %}. To reduce the size of a codespace, you can manually delete files using the terminal or from within {% data variables.product.prodname_vscode %}.

View File

@@ -7,11 +7,10 @@ type: reference
topics:
- Codespaces
- Visual Studio Code
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: Command Palette
---
{% data reusables.codespaces.release-stage %}
## About the Command Palette
The Command Palette is one of the focal features of {% data variables.product.prodname_vscode %} and is available for you to use in Codespaces. The Command Palette allows you to access many commands for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode %}. For more information on using the Command Palette, see "[User Interface](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)" in the Visual Studio Code documentation.
@@ -36,7 +35,7 @@ To see all commands related to {% data variables.product.prodname_github_codespa
### Suspending or stopping a codespace
If you add a new secret, you'll have to stop and restart the codespace for it to apply your changes.
If you add a new secret or change the machine type, you'll have to stop and restart the codespace for it to apply your changes.
To suspend or stop your codespace's container, access the Command Palette, then start typing "stop". Select **Codespaces: Stop Current Codespace**.