1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Codespaces Megabranch - Docs audit and re-org, Landing and Guides page, Secrets doc (#19227)

* reorganizing security and access sections

* updating delete doc

* making vscode doc moore os agnostic

* updating developing in a codespace

* fixing broken links

* fixing some broken links

* fixing broken topic

* fixing broken link

* Managing users permissions for your organization and other stuff (#19231)

* Add new 'Managing user permissions for your organization' article

* Revise 'Managing access and security for Codespaces' and screenshot

* Add codespaces to org repo permissions article

* Apply suggestions from code review

Co-authored-by: Amy Burns <timeyoutakeit@github.com>

* fixing title to match slug

* fixing broken link

* updating personalization doc

* updating troubleshooting guide

* updating creating doc

* adding information about when secrets are used

* removing secrets stuff from this PR

* Addig order of operations for codespaces

* self review fixes

* Apply suggestions from code review

Co-authored-by: Allison Weins <3174849+2percentsilk@users.noreply.github.com>

* renaming quickstart to correct pattern:

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* rewriting re. review comments

* Codespaces landingpage (#19053)

* 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

* testing what is possible for the landing page

* adding first run of landing page

* adding new video and intro text

* add landing page scaffolding

* Update codespaces_code_examples.yml

* lint

* fixing issues in branch

* fixing nav

* fixing broken directs

* Creating guides sub-landing page

* adding topics

* removing unused toopic

* removing instant

* updating landing page and guides page

* updating versioning

* removing unused topic

* removing other versions:

* actually fixing broken links

* fixing title

* fixing intro to suit the landing page

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* adding video

* adding video

* adding correct link for video

* removing duplicated guides

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: Rachael Sewell <rachmari@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* rewording and reorganizing code samples

* fixing some feedback from engineering

* Adding doc on Secrets in codespaces (#19248)

* adding secrets docs

* fixing some broken links

* fixing some more broken redirects

* copy edit and updating limits for secrets

* adding limits for users

* Apply suggestions from code review

Co-authored-by: Felicity Chapman <felicitymay@github.com>

* adding feedback

Co-authored-by: Felicity Chapman <felicitymay@github.com>

* updating beta banner

* adding quickstarts to landing page

* removing availability section from reusable

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Allison Weins <3174849+2percentsilk@users.noreply.github.com>
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: Rachael Sewell <rachmari@github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
This commit is contained in:
Amy Burns
2021-05-11 13:29:34 -04:00
committed by GitHub
parent 7de0f98b71
commit c70adf6702
67 changed files with 638 additions and 234 deletions

View File

@@ -1,32 +1,42 @@
---
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
- /github/developing-online-with-codespaces/creating-a-codespace
versions:
free-pro-team: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
{% data reusables.codespaces.release-stage %}
### About codespace creation
{% data reusables.codespaces.codespaces-are-personal %}
You can create a codespace on either {% data variables.product.prodname_dotcom_the_website %} or in {% data variables.product.prodname_vscode %}. {% 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)."
Codespaces are associated with a specific branch of a repository and the repository cannot be empty. {% 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)."
When you create a codespace, a number of steps happen to enable full access to your development environment.
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)."
- Resources such as a VM and storage for your container are assigned. A new VM is created every time you create or start a codespace to ensure that you always have the latest versions and security patches.
- {% data variables.product.prodname_codespaces %} recieves information about your repository, branch, commits, your public dotfiles repository, and any secrets that you have created.
- {% data variables.product.prodname_codespaces %} executes a shallow clone of the repository.
- If you have one in your repository, {% data variables.product.prodname_codespaces %} runs the `devcontainer.json` file. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
- Your Docker container, `docker-compose`, or other initialization is run.
- At this point, the codespace is marked as available and you can connect.
- Once the codespace is made available, depending on the commands in the devcontainer, the codespace will continue with some set up.
- The codespace shares ports added in the `devcontainer.json` file.
- The codespace runs anything specified in `postCreateCommand`.
- {% data variables.product.prodname_codespaces %} clones your dotfiles repository to the codespaces environment and looks for an install file. For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
- Finally, the codespace does a full clone of the repo so you have full access to it.
{% 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 %}
@@ -48,4 +58,4 @@ The environment of the codespace you create will be based on the repository's co
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)

View File

@@ -1,21 +1,31 @@
---
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
- /github/developing-online-with-codespaces/deleting-a-codespace
versions:
free-pro-team: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
{% 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. Navigate to the repository where you created the codespace. Select **{% octicon "codespaces" aria-label="The codespaces icon" %} Codespaces** and then click {% octicon "gear" aria-label="The Settings gear" %}. This will display all {% data variables.product.prodname_codespaces %} that you have created in the repository.
![Codespaces tab](/assets/images/help/codespaces/codespaces-manage.png)
Alternatively, you can see every codespace owned by your user account at [github.com/codespaces](https://github.com/codespaces).
2. To the right of the codespace you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **{% octicon "trash" aria-label="The trash icon" %} Delete**
![Delete button](/assets/images/help/codespaces/delete-codespace.png)
### Deleting a codespace in {% data variables.product.prodname_vscode %}
For information on deleting a codespace in {% data variables.product.prodname_vscode %}, see "[Using Codespaces in Visual Studio Code](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code#deleting-a-codespace-in-visual-studio-code)."

View File

@@ -1,33 +1,56 @@
---
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
- /github/developing-online-with-codespaces/developing-in-a-codespace
versions:
free-pro-team: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
### About development with {% data variables.product.prodname_codespaces %}
{% data reusables.codespaces.release-stage %}
{% data reusables.codespaces.use-visual-studio-features %}
### About development with {% data variables.product.prodname_codespaces %}
{% 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 variables.product.prodname_codespaces %} provides you with the full development experience of {% data variables.product.prodname_vscode %}. {% data reusables.codespaces.use-visual-studio-features %}
{% 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)."
![Codespace overview with annotations](/assets/images/help/codespaces/codespace-overview-annotated.png)
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
1. Side Bar - By default, this area shows your project files in the Explorer.
2. Activity Bar - This displays the Views and provides you with a way to switch between them. You can reorder the Views by dragging and dropping them.
3. Editor - This is where you edit your files. You can use the tab for each editor to position it exactly where you need it.
4. Panels - This is where you can see output and debug information, as well as the default place for the integrated Terminal.
5. Status Bar - This area provides you with useful information about your codespace and project. For example, the branch name, configured ports, and more.
For more information on using {% data variables.product.prodname_vscode %}, see the [User Interface guide](https://code.visualstudio.com/docs/getstarted/userinterface) in the {% data variables.product.prodname_vscode %} documentation.
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
### Navigating to your codespace
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
{% data reusables.codespaces.navigate-to-codespaces %}
#### Personalizing your codespace
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account)."
{% 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)."
#### Running your app from a codespace
{% 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)."
#### Committing your changes
{% data reusables.codespaces.committing-link-to-procedure %}
### Navigating to an existing codespace
1. {% data reusables.codespaces.you-can-see-all-your-codespaces %}
2. Click the name of the codespace you want to develop in.
![Name of codespace](/assets/images/help/codespaces/click-name-codespace.png)
Alternatively, you can see any active codespaces for a repository by navigating to the repository in which it was made and selecting **{% octicon "codespaces" aria-label="The codespaces icon" %} Codespaces**.

View File

@@ -1,15 +1,19 @@
---
title: Forwarding ports in your codespace
intro: '{% data reusables.codespaces.about-port-forwarding %}'
product: '{% data reusables.gated-features.codespaces %}'
versions:
free-pro-team: '*'
redirect_from:
- /github/developing-online-with-codespaces/forwarding-ports-in-your-codespace
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
{% data reusables.codespaces.release-stage %}
### 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.
@@ -52,7 +56,7 @@ If you want to share a forwarded port with others, you can make the port public.
### 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 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](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project#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.

View File

@@ -1,7 +1,6 @@
---
title: Developing in a codespace
intro: 'Create a codespace to get started with developing your project inside a dedicated cloud environment. You can use forwarded ports to run your application and even use codespaces inside {% data variables.product.prodname_vscode %}'
product: '{% data reusables.gated-features.codespaces %}'
versions:
free-pro-team: '*'
topics:

View File

@@ -1,15 +1,17 @@
---
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/using-codespaces-in-visual-studio-code
- /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: '*'
type: how_to
topics:
- Codespaces
- Visual Studio Code
- Developer
---
{% data reusables.codespaces.release-stage %}
@@ -18,7 +20,21 @@ topics:
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.
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.
{% mac %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Click **Sign in to view {% data variables.product.prodname_dotcom %}...**.
![Signing in to view {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png)
3. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**.
4. Sign in to {% data variables.product.product_name %} to approve the extension.
{% endmac %}
{% windows %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**.
![The {% data variables.product.prodname_codespaces %} header](/assets/images/help/codespaces/codespaces-header-vscode.png)
@@ -27,6 +43,8 @@ To develop in a codespace directly in {% data variables.product.prodname_vscode
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.
{% endwindows %}
### 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 %}.

View File

@@ -1,17 +1,19 @@
---
title: Using source control in your codespace
intro: 'After making changes to a file in your codespace you can quickly commit the changes and push your update to the remote repository.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
free-pro-team: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
### About source control in {% data variables.product.prodname_codespaces %}
{% data reusables.codespaces.release-stage %}
### About source control in {% data variables.product.prodname_codespaces %}
You can perform all the Git actions you need directly within your codespace. For example, you can fetch changes from the remote repository, switch branches, create a new branch, commit and push changes, and create a pull request. You can use the integrated terminal within your codespace to enter Git commands, or you can click icons and menu options to complete all the most common Git tasks. This guide explains how to use the graphical user interface for source control.
Source control in {% data variables.product.prodname_github_codespaces %} uses the same workflow as {% data variables.product.prodname_vscode %}. For more information, see the {% data variables.product.prodname_vscode %} documentation "[Using Version Control in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support)."