我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

Enforcing repository management policies in your enterprise account

企业所有者可为企业帐户拥有的所有组织实施特定仓库管理策略,或允许在每个组织中设置策略。

企业帐户可用于 GitHub Enterprise Cloud。更多信息请参阅“关于企业帐户。”

更多信息请参阅“组织的仓库权限级别”。

本文内容

实施有关默认仓库权限的策略

在您的企业帐户拥有的所有组织中,您可以为组织成员设置默认仓库权限级别(无、读取、写入或管理),或允许所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Default permissions(默认权限)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. 在“Default permissions(默认权限)”下,使用下拉菜单并选择策略。

    带有仓库权限策略选项的下拉菜单

实施有关创建仓库的策略

Across all organizations owned by your enterprise account, you can allow members to create repositories, restrict repository creation to organization owners, or allow owners to administer the setting on the organization level. If you allow members to create repositories, you can choose whether members can create any combination of public, private, and internal repositories. For more information about internal repositories, see "Creating an internal repository."

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository creation(仓库创建)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. Under "Repository creation", select a policy.

    带有仓库创建策略选项的下拉菜单

  5. If you selected Members can create repositories, select one or more repository types.

    Checkbox for repository types

  6. 单击 Save(保存)

实施有关复刻私有仓库的策略

在您的企业帐户拥有的所有组织中,您可以允许有权访问私有仓库的人员进行复刻、永远不允许分支私有仓库或允许所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository forking(仓库复刻)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. 在“Repository forking(仓库复刻)”下,使用下拉菜单并选择策略。

    带有仓库复刻策略选项的下拉菜单

实施有关邀请外部协作者加入仓库的策略

在您的企业帐户拥有的所有组织中,您可以允许成员邀请外部协作者加入仓库、将外部协作者邀请限制为组织所有者或允许所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository invitations(仓库邀请)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. Under "Repository invitations", use the drop-down menu and choose a policy.

    带有外部协作者邀请策略选项的下拉菜单

实施有关更改仓库可见性的策略

在您的企业帐户拥有的所有组织中,您可以允许具有管理员权限的成员更改仓库的可见性、将仓库可见性更改限制为组织所有者或允许所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository visibility change(仓库可见性更改)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. Under "Repository visibility change", use the drop-down menu and choose a policy.

    Drop-down menu with repository visibility policy options

实施有关删除或转让仓库的策略

在您的企业帐户拥有的所有组织中,您可以允许具有管理员权限的成员删除或转让仓库、将仓库删除和转让限制为组织所有者或允许所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository deletion and transfer(仓库删除和转让)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. Under "Repository deletion and transfer", use the drop-down menu and choose a policy.

    Drop-down menu with repository deletion policy options

实施有关设置分支保护规则的策略

在您的企业帐户拥有的所有组织中,您可以允许具有管理员权限的成员更新受保护分支设置、将分支保护设置限制为企业所有者或允许组织所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository branch protection rules(仓库分支保护规则)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. 在“Repository branch protection rules(仓库分支保护规则)”下,使用下拉菜单并选择策略。

    带有分支保护策略选项的下拉菜单

实施有关删除议题的策略

在您的企业帐户拥有的所有组织中,您可以允许具有管理员权限的成员删除仓库中的议题、将议题删除限制为组织所有者或允许所有者在组织级别管理设置。

  1. Navigate to your enterprise account by visiting https://github.com/enterprises/ENTERPRISE-NAME, replacing ENTERPRISE-NAME with your enterprise account's name.

  2. In the enterprise account sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  3. Repository policies(仓库策略)选项卡中的“Repository issue deletion(仓库议题删除)”下,审查有关更改设置的信息。 Optionally, to view the setting's current configuration for all organizations in the enterprise account before enforcing the setting, click View your organizations' current configurations.

    查看企业中组织的当前策略配置的链接

  4. 在“Repository issue deletion(仓库议题删除)”下,使用下拉菜单并选择策略。

    带有议题删除策略选项的下拉菜单

问问别人

找不到要找的内容?

联系我们