#post
github-repo-permissions
- to give a user or github team access to a repo, add them via Repo > Settings > Collaborators and teams
- each user/team can be assigned a role with vary permissions: Read, Triage, Write, Maintain, Admin
github/CODEOWNERS
does not grant access or permissions; any user/team referenced needs to already have Write permissions (or higher)- I got confused at work one day and tried to start by adding a team to a repo via
.github/CODEOWNERS
- I saw a validation error in the GitHub UI on the PR saying the team either didn’t exist or didn’t have write permissions to the repo
- I learned that you need to first give the team access to the repo
- You can do that either through the repo’s settings (makes the most sense) or through the team’s settings (assuming the team member doing so already has Admin access to the repo)