Skip to main content

Enabling Codespaces for your organization

You can control which users in your organization can use Codespaces.

To manage user permissions for Codespaces for an organization, you must be an organization owner.

代码空间可用于使用 GitHub Team 或 GitHub Enterprise Cloud 的组织。 更多信息请参阅“GitHub 的产品”。

About enabling Codespaces for your organization

Organization owners can control which users in your organization can create and use codespaces.

To use codespaces in your organization, you must do the following:

By default, a codespace can only access the repository from which it was created. If you want codespaces in your organization to be able to access other organization repositories that the codespace creator can access, see "Managing access and security for Codespaces."

Enable Codespaces for users in your organization

  1. 在 GitHub.com 的右上角,单击您的头像,然后单击 Your organizations(您的组织)个人资料菜单中的组织

  2. 在组织旁边,单击 Settings(设置)设置按钮

  3. 在左侧边栏中,单击 Codespaces

  4. Under "User permissions", select one of the following options:

    • Selected users to select specific organization members to use 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.

    Radio buttons for "User permissions"

    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."

  5. Click Save.

Disabling Codespaces for your organization

  1. 在 GitHub.com 的右上角,单击您的头像,然后单击 Your organizations(您的组织)个人资料菜单中的组织
  2. 在组织旁边,单击 Settings(设置)设置按钮
  3. 在左侧边栏中,单击 Codespaces
  4. Under "User permissions", select Disabled.

Setting a spending limit

注意:必须先设置支出限额,然后才能使用 Codespaces。

默认情况下,您的组织或企业的 Codespaces 支出限制为 $0,这将阻止创建新代码空间或打开现有代码空间。 若要允许用户在组织中创建代码空间,请将限制设置为大于 $0 的值。

Overages are always billed monthly regardless of your billing term (even if your account is otherwise billed annually).

For information on managing and changing your account's spending limit, see "Managing your spending limit for Codespaces."