Managing access and security for Codespaces

You can manage the repositories that codespaces can access.

Codespaces is available for user accounts using GitHub Free or GitHub Pro. For more information, see "GitHub's products."

In this article

Note: Access and security for Codespaces is currently in beta and subject to change.

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.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.
    Settings icon in the user bar
  2. In the left sidebar, click Codespaces.
    Codespaces tab in the user settings sidebar
  3. Under "Access and security", select the setting you want for your user account.
    Radio buttons to manage trusted repositories
  4. 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.
    "Selected repositories" drop-down menu

Managing security and access for your organization

Organization owners can manage security and access for 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.

  1. In the top right corner of GitHub, click your profile photo, then click Your profile.
    Profile photo
  2. On the left side of your profile page, under "Organizations", click the icon for your organization.
    organization icons
  3. Under your organization name, click Settings.
    Organization settings button
  4. In the left sidebar, click Codespaces.
    "Codespaces" tab in left sidebar
  5. To approve of the pre-release program terms of service on behalf of your organization and enable 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.
    Radio button for "Selected users"
  6. Under "Access and security", select the setting you want for your organization.
    Radio buttons to manage trusted repositories
  7. 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.
    "Selected repositories" drop-down menu

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.