About enabling Codespaces for your organization
组织所有者可以控制组织中的哪些用户可以创建和使用代码空间。
To use codespaces in your organization, you must do the following:
- Ensure that users have at least write access to the repositories where they want to use a codespace.
- Enable Codespaces for users in your organization. You can choose allow Codespaces for selected users or only for specific users.
- Set a spending limit
- Ensure that your organization does not have an IP address allow list enabled. 更多信息请参阅“管理组织允许的 IP 地址”。
By default, a codespace can only access the repository from which it was created. 如果您希望组织中的代码空间能够访问代码空间创建者可以访问的其他组织仓库,请参阅“管理 Codespaces 的访问和安全”。
Enable Codespaces for users in your organization
-
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.

-
在组织旁边,单击 Settings(设置)。

-
In the left sidebar, click Codespaces.
-
在“User permissions(用户权限)”下,选择以下选项之一:
- Selected users(所选用户)选择特定组织成员使用 Codespaces。
- Allow for all members to allow all your organization members to use Codespaces.
- Allow for all members and outside collaborators to allow all your organization members as well as outside collaborators to use Codespaces.

Note: When you select Allow for all members and outside collaborators, all outside collaborators who have been added to specific repositories can create and use Codespaces. Your organization will be billed for all usage incurred by outside collaborators. For more information on managing outside collaborators, see "About outside collaborators."
-
单击 Save(保存)。
Disabling Codespaces for your organization
- In the top right corner of GitHub.com, click your profile photo, then click Your organizations.

- 在组织旁边,单击 Settings(设置)。

- In the left sidebar, click Codespaces.
- Under "User permissions", select Disabled.
设置支出限制
Note: You must set a spending limit before you can use Codespaces.
By default, your organization or enterprise will have a Codespaces spending limit of $0, which prevents new codespaces from being created or existing codespaces from being opened. To allow your users to create codespaces in your organization, set the limit to a value higher than $0.
有关管理和更改帐户支出限制的信息,请参阅“管理 Codespaces 的支出限制”。