Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default permissions for every new Github repository within an organization?

Tags:

github

We have quite a few repositories in our organization, and we are constantly adding more. We also have a few different teams - Superusers, Developers, Contractors, etc. I want every newly created repository to automatically assume default permissions, like Superusers get automatic admin access to the repo, Contractors group gets just read access, etc. Is it possible to set that up? Is there a setting somewhere that I missed? And if there's not a way to do that, is there a way to batch apply a permission for one group to all repos within an account?

like image 601
snetch Avatar asked Sep 11 '25 16:09

snetch


1 Answers

Update June 2017: with nested teams, you now can associate permissions to sub-teams, which could help group of users to have the correct right regarding a repo part of the organization.


Original answer (Apr. 2016)

Is it possible to set that up?

I did not see a way through the native GitHub web GUI administration pages.
And "permission" is deprecated when creating a team.

What you could consider though is a webhook listening for a an event, like a repository event.
That script listening to the event could then use the Team API to update the permission of the teams (according to their names) for the newly created repo.

like image 67
VonC Avatar answered Sep 13 '25 06:09

VonC