Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-06-03. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Promoting or demoting a site administrator

Site administrators can promote any normal user account to a site administrator, as well as demote other site administrators to regular users.

Note: 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. In this case, you can't manually promote users with the steps below; you must add them to the LDAP administrators group.

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

Promoting a user from the enterprise settings

  1. 在 GitHub Enterprise Server 的右上角,单击您的个人资料照片,然后单击 Enterprise settings(Enterprise 设置)GitHub Enterprise Server 上个人资料照片下拉菜单中的"Enterprise settings(企业设置)"

  2. 在企业帐户侧边� �中,单击 People(人员)企业帐户侧边� �中的 People(人员)选项卡

  3. 在“ People(人员)”下,单击 Administrators(管理员)

    管理员选项卡

  4. In the upper-right corner of the page, click Add owner. Button to add an admin

  5. In the search field, type the name of the user and click Add. Search field to add an admin

Demoting a site administrator from the enterprise settings

  1. 在 GitHub Enterprise Server 的右上角,单击您的个人资料照片,然后单击 Enterprise settings(Enterprise 设置)GitHub Enterprise Server 上个人资料照片下拉菜单中的"Enterprise settings(企业设置)"

  2. 在企业帐户侧边� �中,单击 People(人员)企业帐户侧边� �中的 People(人员)选项卡

  3. 在“ People(人员)”下,单击 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. Search field to find an administrator

  5. In the search results, find the username of the person you want to demote, then use the drop-down menu, and select Remove owner. Remove from enterprise option

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