Skip to main content

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

升级或降级站点管理员

站点管理员可以将任何普通用户升级为站点管理员,也可以将其他站点管理员降级为普通用户。

注意

For information about promoting a user to an organization owner, see the ghe-org-admin-promote section of Command-line utilities.

Considerations with external authentication

If you use certain external authentication features, you may not be able to manage promotion and demotion from the enterprise settings or command line:

  • If you use SAML authentication, and have not selected Disable administrator demotion/promotion in the SAML settings in the site admin dashboard, administrator rights will be determined by your SAML provider.
  • If you have enabled SCIM provisioning, for SCIM-provisioned users, you must manage roles from your identity provider.
  • If LDAP Sync is enabled, and the Administrators group attribute is set when configuring LDAP access for users, those users will automatically have site administrator access to your instance. To promote users, you must add them to the LDAP Administrators group.

Promoting a user from the enterprise settings

  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 People.
  3. Under " People", click Administrators.
  4. In the upper-right corner of the page, click Add owner.
  5. In the search field, type the name of the user, then click Add.

Demoting a site administrator from the enterprise settings

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

  3. Under " People", click Administrators.

  4. In the upper-left corner of the page, in the "Find an administrator" search field, type the username of the person you want to demote.

  5. In the search results, find the username of the person you want to demote, then select the dropdown menu and click Convert to member.

    Screenshot of a user in the enterprise administrators list. A dropdown menu, labeled with a kebab icon, is highlighted with an orange outline.

Promoting a user from the command line

  1. SSH into your appliance.

  2. Run ghe-user-promote with the username to promote.

    ghe-user-promote USERNAME
    

Demoting a site administrator from the command line

  1. SSH into your appliance.

  2. Run ghe-user-demote with the username to demote.

    ghe-user-demote USERNAME