Как удалить уволенного сотрудника из всех репозиториев GitHub?
Есть Pro аккаунт, куча репозиториев (преимущественно приватных). По мере необходимости админ добавляет разработчиков в репо (Settings -> Manage access -> Invite a collaborator).
Если сотрудник уволился, то приходится руками проходить по каждому репо и шариться в Manage access, чтобы удалить его из репо.
Кажется, это можно сделать как-то проще/быстрее/правильнее.
Кто-нибудь знает как?
- Вопрос задан более трёх лет назад
- 1746 просмотров
1 комментарий
Простой 1 комментарий

Вообще надо user добавлять в team, например Front_End-Team, а уже в репозитории добавлять какие команды будут иметь доступ. Потом просто убрать user из команды и все !
Решения вопроса 1
Если у вас аккаунт организации — то там всё просто: На основной странице организации вкладка People, дальше слева выбираете либо Members либо Outside collaborators, там выбираете нужного человека и слева внизу будет кнопка «Remove from all repositories».
Если же у вас просто личный аккаунт — то там такого не предполагается (что естественно).
Возможно вам стоит рассмотреть вариант перевода вашего аккаунта в аккаунт организации (Settings -> Organisations -> Transform account) если по факту это всё равно организация. Конечно в этом случае поменяется схема биллинга, но GitHub недавно сильно снизил цены для GitHub for Teams так что вполне можно пользоваться.
Removing repository collaborator
Get full access to Complete Git Guide: Understand and Master Git and GitHub and 60K+ other titles, with a free 10-day trial of O’Reilly.
There are also live events, courses curated by job role, and more.
Get Complete Git Guide: Understand and Master Git and GitHub now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Удаление участника совместной работы из личного репозитория
При удалении участника совместной работы из проекта он потеряет доступ на чтение и запись в репозиторий. Если репозиторий является частным, а пользователь создал вилку, вилка также будет удалена.
Если вы используете GitHub Free, в общедоступных и частных репозиториях можно добавить неограниченное число участников совместной работы.
Deleting forks of private repositories
While forks of private repositories are deleted when a collaborator is removed, the person will still retain any local clones of your repository.
Removing collaborator permissions from a person contributing to a repository
- On GitHub.com, navigate to the main page of the repository.
- Under your repository name, click
Settings. If you cannot see the «Settings» tab, select the

dropdown menu, then click Settings.
Further reading
- «Removing organization members from a team»
- «Removing an outside collaborator from an organization repository»
Removing a collaborator from a personal repository
When you remove a collaborator from your project, they lose read/write access to your repository. If the repository is private and the person has created a fork, then that fork is also deleted.
Deleting forks of private repositories
While forks of private repositories are deleted when a collaborator is removed, the person will still retain any local clones of your repository.
Removing collaborator permissions from a person contributing to a repository
- On your GitHub Enterprise Server instance, navigate to the main page of the repository.
- Under your repository name, click
Settings. If you cannot see the «Settings» tab, select the

dropdown menu, then click Settings.
Further reading
- «Removing organization members from a team»
- «Removing an outside collaborator from an organization repository»