Skip to main content

Включение или отключение Codespaces для вашей организации

Кто может использовать эту функцию?

Organization owners can control which users can use Codespaces.

Organizations on Team and Enterprise plans can choose to disable Codespaces in private repositories. For more information, see Планы .

Codespaces is always available in an organization's public repositories, and any user can create a codespace from these repositories. If your organization is on a Free plan, Codespaces is always available in your organization's private repositories too, and any users with access to these repositories can create a codespace at their own expense.

If you're the owner of an organization on a Team or Enterprise Cloud plan, you can choose whether to enable or disable Codespaces in your organization's private repositories. If you enable Codespaces in these repositories, you can choose whether to enable for all users or for a selection of members and collaborators.

By enabling Codespaces, you can help your members and collaborators get started with projects quickly, without needing to install lots of tools and dependencies locally to start contributing. However, you might want to roll out Codespaces gradually across your organization by enabling it for groups of users at a time. Alternatively, if you need to comply with security regulations that require increased control over the private code in your organization, you might want to disable Codespaces for all your members.

If you have enabled Codespaces in private repositories for at least some users, you can choose to pay for these users' usage of Codespaces across all repositories in your organization. For more information, see Choosing who owns and pays for codespaces in your organization.

If you cannot access the settings to enable Codespaces in your organization, this may be because an enterprise owner has disabled Codespaces for your organization. For more information, see Enforcing policies for Codespaces in your enterprise in the Enterprise Cloud documentation.

Only people who can either push changes to a repository, or fork the repository, can create a codespace for that repository. To allow a user to create codespaces for a repository owned by your organization, you must do one of the following things.

  • Ensure that the user has read access to the repository, and the repository permits forking, so that the user can create a codespace from the repository, push their changes to a fork, and create a pull request for any changes they want to make. For more information, see Managing the forking policy for your organization.
  • Ensure that the user has write access to the repository, so that they can push changes directly to the repository without forking.

In addition, to allow users to create codespaces, you must ensure that your organization does not have an IP address allow list enabled. For more information, see Managing allowed IP addresses for your organization in the Enterprise Cloud documentation.

Примечание.

If you are a verified educator or a teacher, you must enable Codespaces from a Classroom to use your Codespaces Education benefit. For more information, see Using Codespaces with Classroom.

If you remove a user's access to Codespaces, the user will immediately be unable to open existing codespaces they have created from your organization's private repositories. If you were previously paying for codespaces the user had created from your organization's public repositories, ownership of these codespaces will transfer the user.

Before removing users' access, you should alert the affected users. If they have unpublished work in a codespace, they can make sure the work is pushed to a branch in the repository before they lose access.

Once a user loses access to a codespace, the codespace is retained for a period of 7 days, then it is permanently deleted. During this 7-day period, to recover unpublished work from the codespace, the user must contact us through the Support portal.

Примечание.

If you remove a user's access to Codespaces, the user will immediately be unable to open existing codespaces they have created from your organization's private repositories. For more information, see About changing your settings.

  1. In the upper-right corner of , select your profile photo, then click Your organizations.

  2. Next to the organization, click Settings.

  3. In the left sidebar, click Codespaces.

  4. Under Codespaces, in the left sidebar, click General.

  5. On the Codespaces settings page, under "Codespaces access," select your preferred setting for Codespaces in your organization's private repositories.

    You can disable Codespaces, enable for specific members or teams, enable for all members, or enable for all members and collaborators.