1
0
mirror of synced 2026-01-07 09:01:31 -05:00

Merge pull request #33933 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-07-10 20:33:13 -07:00
committed by GitHub
5 changed files with 66 additions and 7 deletions

View File

@@ -49,6 +49,11 @@ For more information, see the following articles.
* "[AUTOTITLE](/organizations/managing-organization-settings/deleting-an-organization-account)"
* "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/removing-yourself-from-an-organization)"
{% ifversion ghes %}
> [!NOTE]
> * You should contact an enterprise owner before deleting your account on {% data variables.product.product_name %}.
{% endif %}
## Back up your account data
Before you delete your personal account, make a copy of all repositories, private forks, wikis, issues, and pull requests owned by your account. For more information, see "[AUTOTITLE](/repositories/archiving-a-github-repository/backing-up-a-repository)."

View File

@@ -0,0 +1,53 @@
---
title: Deleting users from your instance
intro: "You can delete a user's account to permanently remove their data from {% data variables.location.product_location %}."
versions:
ghes: '*'
type: how_to
topics:
- Access management
- Enterprise
- Security
- User account
shortTitle: Delete a user
permissions: Site administrators
---
## What happens when I delete a user account?
Deleting a user account removes all repositories, forks of private repositories, wikis, issues, pull requests, pages, and packages and container images owned by the user account. By deleting a user account, **you may break software projects and workflows that depend on these things.**
Issues and pull requests the user has created and comments they've made in repositories owned by other users or organizations will not be deleted and will instead be associated with a `ghost` user account.
Once a user account has been deleted, the username will be available for use with a different account on {% data variables.location.product_location %}.
## When can I delete a user account?
You cannot delete a user that is currently an organization owner.
* **If the user is the only owner**: Transfer ownership to another person, or delete the organization. See "[AUTOTITLE](/organizations/managing-organization-settings/transferring-organization-ownership)" and "[AUTOTITLE](/organizations/managing-organization-settings/deleting-an-organization-account)."
* **If there are other owners**: Remove the user from the organization. See "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/removing-yourself-from-an-organization)."
You cannot delete your own user account. If you need to delete your own user account, ask another site administrator to delete your account for you.
## Should I delete or suspend a user account?
{% data variables.product.prodname_dotcom %} recommends suspending users where possible, rather than deleting their accounts. Suspending user accounts on {% data variables.product.product_name %} preserves the history of resources owned by the user account, such as repositories and pull requests, and releases the licensed seat previously consumed by the user. See "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/suspending-and-unsuspending-users)."
As an alternative to deleting or suspending a user account, to stop a user's repositories being permanently removed from your enterprise you can place a legal hold on the user account. See "[Placing a legal hold on a user or organization](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/placing-a-legal-hold-on-a-user-or-organization)."
## Deleting a user from the site admin dashboard
Before deleting a user account, you should consider if a backup or copy of the repositories, private forks, wikis, issues, and pull requests owned by the user account is required. See "[AUTOTITLE](/admin/backing-up-and-restoring-your-instance/configuring-backups-on-your-instance)" and "[AUTOTITLE](/repositories/archiving-a-github-repository/backing-up-a-repository)."
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.search-user %}
{% data reusables.enterprise_site_admin_settings.click-user %}
{% data reusables.enterprise_site_admin_settings.admin-top-tab %}
1. Under "Delete account," in the "Danger Zone" section, click **Delete this account**.
1. In the "Delete account" dialog box, under "Make sure you want to do this", review the changes. To confirm, enter the username of the account to be deleted.
1. Click **Delete this account**.
## Further reading
* "[AUTOTITLE](/rest/enterprise-admin/users#delete-a-user)"

View File

@@ -33,10 +33,10 @@ children:
- /removing-a-member-from-your-enterprise
- /managing-dormant-users
- /suspending-and-unsuspending-users
- /deleting-users-from-your-instance
- /placing-a-legal-hold-on-a-user-or-organization
- /auditing-ssh-keys
- /rebuilding-contributions-data
- /enabling-guest-collaborators
shortTitle: Manage users
---

View File

@@ -41,6 +41,8 @@ Dormancy applies to both enterprise members and outside collaborators.
{% ifversion ghes %}
Dormant users are not automatically suspended. Consider suspending dormant users to release license seats. See "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/suspending-and-unsuspending-users)."
## Viewing dormant users
{% data reusables.enterprise-accounts.viewing-dormant-users %}

View File

@@ -29,18 +29,17 @@ When you suspend a user, the change takes effect immediately with no notificatio
```shell
$ git clone git@[hostname]:john-doe/test-repo.git
Cloning into 'test-repo'...
ERROR: Your account is suspended. Please check with
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 "[AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator)."
{% tip %}
**Note:** If [LDAP Sync is enabled](/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) for {% data variables.location.product_location %}, 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.
{% endtip %}
> [!TIP]
> * If LDAP Sync is enabled for {% data variables.location.product_location %}, users are automatically suspended based on the scenarios that are described in "[AUTOTITLE](/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync)."
> * A user cannot be suspended or unsuspended from the site admin dashboard or from the command line when LDAP Sync is enabled for your instance.
> * {% data variables.product.prodname_dotcom %} recommends suspending users where possible, rather than deleting their accounts.
## Viewing suspended users in the site admin dashboard