1
0
mirror of synced 2025-12-25 11:03:37 -05:00
Files
docs/content/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces.md
Emily Gould d2d8f0b22e Fix initial errors identified when trying Vale (#17608)
* Fix errors in education product

* Fix errors in admin configuration docs

* Fix a few stray errors

* This works as is

* Sundry fixes picked up by Vale

* Another batch

* Today's batch of content fixes

* Sundry fixes

* More small updates

* Don't introduce a typo when we're trying to fix them

* Update content/admin/authentication/using-ldap.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

Co-authored-by: Laura Coursen <lecoursen@github.com>
2021-02-09 21:08:36 +00:00

61 lines
2.8 KiB
Markdown

---
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: '*'
---
{% 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
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
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.codespaces-tab %}
1. To the right of "Codespaces secrets", click **New secret**.
!["New secret" button](/assets/images/help/settings/codespaces-new-secret-button.png)
1. Under "Name", type a name for your secret.
!["Name" text box](/assets/images/help/settings/codespaces-secret-name-field.png)
{% 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**.
!["Update" button](/assets/images/help/settings/codespaces-secret-update-button.png)
1. Under "Value", click **enter a new value**.
!["enter a new value" link](/assets/images/help/settings/codespaces-secret-update-value-text.png)
{% 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.
![Checkboxes to remove access to repositories](/assets/images/help/settings/codespaces-secret-repository-checkboxes.png)
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**.
!["Delete" button](/assets/images/help/settings/codespaces-secret-delete-button.png)
1. Read the warning, then click **OK**.
![Confirmation to delete secret](/assets/images/help/settings/codespaces-secret-delete-warning.png)