Managing repository access for your codespaces

You can manage the repositories that Codespaces can access.

Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. For more information, see "GitHub's products."

When you enable access and security for a repository owned by your user account, any codespaces that are created for that repository will have read permissions to all other repositories you own. If you want to restrict the repositories a codespace can access, you can limit to it to either the repository the codespace was opened for 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

Further Reading

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.