Who can see a private GitHub repository?
A private GitHub repository is hidden from the public. In an organization, its audience can include owners, members with base access, team members, people with repository access through an organization role, and direct collaborators.
Private does not mean team-only
The private setting limits public visibility; it does not select an owning team. Anyone with an applicable Read permission or higher can access the repository. Organization owners retain Admin access to every organization repository, even when base permissions are None.
Who gets access to a private organization repository?
| Access path | Who can see the repository? | What to check |
|---|---|---|
| Organization ownership | Every organization owner has Admin access. | The organization's owner list, not just the repository's team list. |
| Base permissions | Members receive the configured minimum access. None removes this default path; it does not remove other grants. | Organization Settings → Member privileges → Base permissions. This default does not apply to outside collaborators. |
| Teams and inherited access | Members of a team with repository access, including child teams that inherit a parent grant. | All granted teams, their members, and their children. A child-team grant does not grant access to its parent. |
| Organization roles | People assigned a role that includes repository access. Security managers, for example, can read every organization repository. | The permissions of the assigned role; an organization role name alone does not prove code access. |
| Direct grants | Members or outside collaborators explicitly granted access to this repository. | Individual grants and their purpose, including people who also receive team access. |
Worked example: a private repo with more than one audience
Imagine acme/security-service has base permissions set to None. The Security team has Write, alice-dev has a direct Read grant, and outside collaborator vendor-reviewer has Read. All three paths provide access; owners and any applicable organization roles still count as well.
- Base permissionNoneNo default member access
- Team grantSecurity: WriteTeam members can access the repo
- Direct member grant
alice-dev: ReadAccess outside the team - Outside collaborator
vendor-reviewer: ReadAccess outside the organization
Removing the vendor's grant closes that path. It does not change Alice's grant or the team's access. Making Security secret would hide the team from most members, but leave these repository permissions intact.
How to check who can see your repository in GitHub
- As a repository admin, open Settings → Collaborators & teams and inspect the access list. Where available, review both Direct access and Organization access.
- Check team membership and inheritance, organization base permissions, owners, and roles with repository access.
- For each unexpected person, identify every route that permits access. Removing one route is insufficient if another remains.
To change the configuration, follow Restrict GitHub repository access to one team. For inheritance, use GitHub Teams hierarchy and repository permissions. For overlapping grants, read GitHub Direct access vs Organization access.
Are GitHub repositories private by default?
There is no universal private default. Check the visibility chosen when creating the repository and any organization or enterprise policy that limits the options. A private repository owned by a personal account has its own owner and invited collaborators; organization base permissions and teams apply to organization repositories.
Does a secret team make a repository private to that team?
No. Team visibility controls who can discover the team. Repository permissions control access to its code. Secret teams cannot be nested, and other repository access paths remain active regardless of whether the intended team is secret.
Read and Write are separate decisions. Once the audience is correct, review blanket GitHub write access risks before granting broad contribution permissions.
Find grants that need a closer review
repod's free audit surfaces direct grants, outside collaborators, private repositories without team coverage, and high-privilege teams. Use those findings alongside the native owner, base-permission, and organization-role checks above.