Collaborating on code is one of GitHub’s core strengths. If you’re working on a project with others, you’ll eventually need to grant access to new team members. Whether you’re managing an open-source project or a private repository, GitHub makes it easy to invite collaborators and set permission levels.
In this post, we’ll walk you through how to add a new user to your GitHub repository.
👤 Who Can Add Users?
Only users with Admin or Owner permissions on a repository can add collaborators or manage access.
🔐 Private vs. Public Repositories
- Private Repositories: You must explicitly invite users and assign permissions.
- Public Repositories: You can still add collaborators for write/admin access, though anyone can view the code.
✅ Step-by-Step: How to Add a New Collaborator
🔧 Method 1: Directly from the Repository Settings
- Log in to GitHub and navigate to your repository.
- Click on the “Settings” tab (you must have admin access).
- In the left sidebar, click “Collaborators and teams” (or “Manage access”).
- Click the “Invite a collaborator” button.
- Enter the GitHub username or email address of the person you want to add.
- Click “Add”, then assign the appropriate permission level:
- Read: View the repository
- Triage: Manage issues and pull requests (limited)
- Write: Push to the repo, create branches
- Maintain: Manage repo settings without admin rights
- Admin: Full control
- The user will receive an email invitation to accept access.
🏢 Method 2: For Organizations – Add Users via Teams
If your repository is part of a GitHub Organization, you can manage access via teams.
- Go to your organization dashboard.
- Click “Teams” > select or create a new team.
- Add members to the team.
- Assign repository access to that team with specific permission levels.
This is the preferred method for larger teams, as it centralizes access control.
🛠 Managing Permissions After Adding
You can always adjust user permissions later:
- Go to the repository’s Settings > Collaborators and teams.
- Find the user.
- Click the dropdown to change their role or remove them.
🧪 Verifying Access
Once the user accepts the invite, they will be able to:
- Clone the repository
- Contribute via branches or pull requests
- Push changes (if granted Write or higher access)
You can verify their access by checking the “People” section under the repo settings.
🧠 Best Practices
- Avoid granting Admin access unless necessary.
- Use Teams for better scalability in organizations.
- Periodically review collaborators and permissions.
- Use branch protection rules to enforce workflows (e.g., required reviews).
🔒 Bonus: Use GitHub Roles for Enhanced Access Control
For enterprise repositories, GitHub also offers fine-grained personal access tokens, SAML-based role mapping, and audit logs. These are especially useful for compliance and security-sensitive environments.
🎉 Conclusion
Adding users to a GitHub repository is quick and straightforward, but assigning the right level of access is key to maintaining security and productivity. Whether you’re working with one collaborator or managing a large team, GitHub offers flexible tools to keep your workflow organized.