Team access to private organisation repositories

I’m rather confused about access to private repositories. I’ve created a new organisation “testorg”, with teams “testorgteamread”, “testorgteamwrite” and “testorgteamadmin” (with the indicated access rights) (in addition to the automatic “owners” team). But when I create a private repository, only members of the owners team can access it (others get 404). If I change the repository to public, then all members can access it, but so can non-members.

So, if I want to make a repository accessible to a user, I either have to make the repository public (not good), or give that user powerful owner rights (not good), or add the user explicitly as a collaborator to the repository (doable, but that’s lots of repetitive management work, and then what’s the point of teams or even organisations). Unless (as I suspect) I’m missing something? Maybe I’ve overlooked a key interface or configuration file setting?

I have found this: https://github.com/go-gitea/gitea/issues/2562#issuecomment-330942099. So maybe the key is “You need to add user to team with access rights to private repository (default is owner team) if you want to grant him access to private repositories of organization.”. How do I override the owner team default, so that a user doesn’t have to be a member of the owners team to access an organisation’s private repository?

Thanks in advance!

Hi,

this is indeed rather confusing. If I remember correctly, you will have to go to the team settings of the team you want to give access. There you can find a tab for members and one for repositories. In order for the team to access a private repository, you need to add it to the team’s list of repositories.

Hope that helps

Aha, I see! That still requires adding a new private repository to each team, but that makes more sense and is less work than adding every user individually. Thanks for your quick help!

1 Like