If employees leave the company, you can suspend their GitHub Enterprise Server accounts to open up user licenses in your GitHub Enterprise license while preserving the issues, comments, repositories, gists, and other data they created. Suspended users cannot sign into your instance, nor can they push or pull code.
When you suspend a user, the change takes effect immediately with no notification to the user. If the user attempts to pull or push to a repository, they'll receive this error:
$ git clone git@[hostname]:john-doe/test-repo.git
Cloning into 'test-repo'...
ERROR: Your account is suspended. Please check with your installation administrator.
fatal: The remote end hung up unexpectedly
Before suspending site administrators, you must demote them to regular users. For more information, see "Promoting or demoting a site administrator."
Note: If LDAP Sync is enabled for tu instancia de GitHub Enterprise Server, users are automatically suspended when they're removed from the LDAP directory server. When LDAP Sync is enabled for your instance, normal user suspension methods are disabled.
Suspending a user from the user admin dashboard
-
Desde una cuenta administrativa de GitHub Enterprise Server, en la esquina superior derecha de cualquier página, haz clic en .
-
Si aún no estás en la página de "Administrador de sitio", en la esquina inferior izquierda, haz clic en Administrador de sitio.
-
En el campo de búsqueda, teclea el nombre de usuario y da clic en Buscar.
-
En los resultados de búsqueda, da clic en el nombre del usuario.
-
En la parte superior derecha de la página, da clic en Admin.
-
En la barra lateral izquierda, haz clic en Admin (Administrador).
-
Under "Account suspension," in the red Danger Zone box, click Suspend.
-
Provide a reason to suspend the user.
Unsuspending a user from the user admin dashboard
As when suspending a user, unsuspending a user takes effect immediately. The user will not be notified.
-
Desde una cuenta administrativa de GitHub Enterprise Server, en la esquina superior derecha de cualquier página, haz clic en .
-
Si aún no estás en la página de "Administrador de sitio", en la esquina inferior izquierda, haz clic en Administrador de sitio.
-
In the left sidebar, click Suspended users.
-
Click the name of the user account that you would like to unsuspend.
-
En la parte superior derecha de la página, da clic en Admin.
-
En la barra lateral izquierda, haz clic en Admin (Administrador).
-
Under "Account suspension," in the red Danger Zone box, click Unsuspend.
-
Provide a reason to unsuspend the user.
Suspending a user from the command line
- SSH en tu instancia de GitHub Enterprise Server. Para obtener más información, consulta "Acceder al shell administrativo (SSH)."
$ ssh -p 122 admin@HOSTNAME
- Run ghe-user-suspend with the username to suspend.
$ ghe-user-suspend username
Creating a custom message for suspended users
You can create a custom message that suspended users will see when attempting to sign in.
-
En la esquina superior derecha de GitHub Enterprise Server, da clic en tu foto de perfil y luego en Configuración de empresa.
-
En la barra lateral de la cuenta de empresa, haz clic en Settings (Configuraciones).
-
Debajo de " Configuraciones", haz clic en Messages (Mensajes).
-
Click Add message.
-
Type your message into the Suspended user message box. You can type Markdown, or use the Markdown toolbar to style your message.
-
Click the Preview button under the Suspended user message field to see the rendered message.
-
Review the rendered message.
-
En la parte inferior de la página, da clic en Guardar cambios.
Unsuspending a user from the command line
- SSH en tu instancia de GitHub Enterprise Server. Para obtener más información, consulta "Acceder al shell administrativo (SSH)."
$ ssh -p 122 admin@HOSTNAME
- Run ghe-user-unsuspend with the username to unsuspend.
$ ghe-user-unsuspend username