Step 1: Navigate to GitHub and sign in
- Open your web browser and go to https://github.com.
- Click Sign in (top right) and enter your GitHub username/email and password.
- After signing in, confirm you see your avatar in the top-right corner.
Step 2: Open your repository
- Click your avatar (top right) and select Your repositories.
- From the list, click the repository from which you want to remove a collaborator.
- You should now be on the main page of that repository.
Step 3: Go to the repository Settings
- On the repository page, locate the tab bar near the top.
- Click the Settings tab (usually the last tab).
Step 4: Access the Manage access section
- In the left sidebar, click Manage access.
- GitHub may prompt you to re-authenticate for security. Click Confirm password or complete the authentication flow.
Step 5: Find the collaborator you want to remove
- Under Manage access, you’ll see a list of users and teams with access to this repository.
- Scroll through or use the search field to locate the collaborator’s username.
Step 6: Remove the collaborator via the web interface
- Next to the collaborator’s name, click the gear icon (⚙️).
- In the dropdown, click Remove access.
Step 7: Confirm the removal
- A confirmation dialog appears: “Remove this collaborator from the repository?”
- Click the Remove from repository button to confirm.
Step 8: Verify that the collaborator has been removed
- After confirmation, you should no longer see the user listed under Manage access.
- The removed collaborator will lose access immediately and receive a notification email.
Step 9: (Optional) Remove a collaborator using GitHub CLI
- Ensure you have the GitHub CLI installed and are authenticated (
gh auth login
).
- Run the following command, replacing
OWNER/REPO
and USERNAME
:
gh repo remove-collaborator OWNER/REPO USERNAME
- If prompted, confirm the operation by typing Y and pressing Enter.
Step 10: Final confirmation
- Return to the repository’s Manage access page (web UI) to ensure the collaborator is gone.
- Your repository’s access list now reflects only the remaining collaborators and teams.