Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

在企业中为项目实施策略

可以为企业组织内的 projects 和 项目(经典) 实施策略,或者允许在每个组织中设置策略。

谁可以使用此功能?

Enterprise owners can enforce policies for projects in an enterprise.

About policies for projects in your enterprise

You can enforce policies to control how enterprise members manage projects and projects (classic), or you can allow organization owners to manage policies for projects and projects (classic) at the organization level.

Some policies apply to both Projects, the new projects experience, and projects (classic), the previous experience, while some apply only to projects (classic). For more information about each experience, see About Projects and About projects (classic).

Enforcing a policy for organization-wide projects

Across all organizations owned by your enterprise, you can enable or disable organization-wide projects, or allow owners to administer the setting on the organization level.

  1. In the top-right corner of GitHub Enterprise Server, click your profile picture, then click Enterprise settings.

  2. On the left side of the page, in the enterprise account sidebar, click Policies.

  3. Under " Policies", click Projects.

  4. Under "Organization projects", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.

    Screenshot of a policy in the enterprise settings. A link, labeled "View your organizations' current configurations", is outlined.

  5. Under "Organization projects", select the dropdown menu and click a policy.

Enforcing policies for projects (classic)

Some policies apply only to projects (classic).

Enforcing a policy for repository projects

Across all organizations owned by your enterprise, you can enable or disable repository-level projects, or allow owners to administer the setting at the organization level.

  1. In the top-right corner of GitHub Enterprise Server, click your profile picture, then click Enterprise settings.

  2. On the left side of the page, in the enterprise account sidebar, click Policies.

  3. Under " Policies", click Projects.

  4. Under "Repository projects", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.

    Screenshot of a policy in the enterprise settings. A link, labeled "View your organizations' current configurations", is outlined.

  5. Under "Repository projects", select the dropdown menu and click a policy.