Skip to main content

Restricting deploy keys in your organization

To protect your organization's data, you can configure permissions for creating deploy keys in your organization.

谁可以使用此功能?

Organization owners.

You can choose whether members can create deploy keys for repositories in your organization.

By default, new organizations are configured to disallow the creation of deploy keys in repositories.

Organization owners can restrict the creation of deploy keys to help prevent sensitive information from being exposed. For more information, see "防止组织中数据泄露的最佳做法" and "管理部署密钥." If you want more fine-grained control over permissions, consider using a GitHub App instead. See "GitHub 应用概述."

If your organization is owned by an enterprise account, you may not be able to configure this setting for your organization, if an enterprise owner has set a policy at the enterprise level. For more information, see "在企业中实施仓库管理策略."

Warning

Changing this setting to disabled will result in existing deploy keys being disabled in all repositories in the organization. Scripts, apps, or workflows that create, use, or delete deploy keys will no longer work.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击 你的组织”。
  2. 在组织旁边,单击“设置”。
  3. 在侧边栏的“访问”部分,单击“成员特权”****。
  4. Under "Deploy keys", review the information about changing the setting, click Enabled or Disabled.
  5. Click Save.