Where to start
-
In your enterprise account, open the Policies tab.
Enterprise policies can govern many areas (Actions, Codespaces, Advanced Security, member privileges). This guide focuses on repository policies and how to restrict repository creation to approved identities. -
At the enterprise level, create a ruleset and:
- Define the ruleset name and activate it.
- Configure an allow list of users or roles (for example, organization owners or admins).
- Target the organization(s) and repositories to which the ruleset should apply.
- Choose enforcement options (restrict creations, deletions, transfers, name or visibility changes).
- Name the policy (for example:
repo-policy-1). - Activate the policy.
- Add the desired identities to the allow list — in this demo we add the organization owners/admins.
- Target one or more organizations — here we target the Game Dev Studio organization.

Selecting repositories and enforcement options
After targeting organizations, select whether the policy should apply to:- All repositories in the targeted organization(s), or
- A subset of repositories (scoped by name patterns or selection).

How enforcement behaves in practice
- Owners/admins on the policy allow list: can create repositories in the targeted organization(s) as usual.
- Regular members not on the allow list: will be unable to create repositories; the targeted organization will be disabled or blocked when attempting to create a new repository.

Quick reference: enforcement options
Best practices and checklist
- Test policies in a non-production organization before broad rollout.
- Use allow lists conservatively—prefer role-based entries (organization owners, admins) rather than large user lists.
- Combine policy targeting with repository naming patterns or tags to scope enforcement precisely.
- Monitor policy effects and audit logs after activation to ensure expected behavior and to catch any unintended restrictions.
Enterprise repository policies are enforced at the enterprise level and apply only to the organizations and repositories you explicitly target. Make sure to test policy behavior in a non-production org before rolling out broadly.
Links and references
- GitHub documentation: Repository policies and enterprise rulesets
- GitHub Enterprise administration docs