ドキュメントには頻繁に更新が加えられ、その都度公開されています。本ページの翻訳はまだ未完成な部分があることをご了承ください。最新の情報については、英語のドキュメンテーションをご参照ください。本ページの翻訳に問題がある場合はこちらまでご連絡ください。

Managing encrypted secrets for Codespaces

You can store sensitive information, like tokens, that you want to access in your codespaces via environment variables.

Codespacesは、GitHub FreeもしくはGitHub Proを使っているユーザアカウントで利用できます。 For more information, see "GitHub's products."

ここには以下の内容があります:

Note: Encrypted secrets for Codespaces is currently in beta and subject to change.

About encrypted secrets for 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

  1. 任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてください。
    ユーザバーの [Settings(設定)] アイコン
  2. In the left sidebar, click Codespaces.
    Codespaces tab in the user settings sidebar
  3. To the right of "Codespaces secrets", click New secret.
    "New secret" button
  4. Under "Name", type a name for your secret.
    "Name" textbox
  5. Under "Value", type the value of your secret.
    "Value" textbox
  6. Select the "Repository access" drop-down menu, then click a repository you want to have access to the secret. Repeat for every repository you want to have access to the secret.
    "Repository access" drop-down menu
  7. [Add secret(シークレットの追加)] をクリックします。

Editing a secret

You can update the value of an existing secret, and you can change which repositories can access a secret.

  1. 任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてください。
    ユーザバーの [Settings(設定)] アイコン
  2. In the left sidebar, click Codespaces.
    Codespaces tab in the user settings sidebar
  3. Under "Codespaces secrets", to the right of the secret you want to edit, click Update.
    "Update" button
  4. Under "Value", click enter a new value.
    "enter a new value" link
  5. Under "Value", type the value of your secret.
    "Value" textbox
  6. Select the "Repository access" drop-down menu, then click a repository you want to have access to the secret. Repeat for every repository you want to have access to the secret.
    "Repository access" drop-down menu
  7. Optionally, to remove the secret's access to a repository, deselect the repository.
    Checkboxes to remove access to repositories
  8. [Save changes] をクリックします。

Deleting a secret

  1. 任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてください。
    ユーザバーの [Settings(設定)] アイコン
  2. In the left sidebar, click Codespaces.
    Codespaces tab in the user settings sidebar
  3. Under "Codespaces secrets", to the right of the secret you want to delete, click Delete.
    "Delete" button
  4. 警告を読んで、OKをクリックしてください。
    Confirmation to delete secret

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

OR, learn how to contribute.