Skip to main content

Restriction des changements de visibilité des dépôts dans votre organisation

Pour protéger les données de votre organisation, vous pouvez configurer des autorisations pour le changement de la visibilité du dépôt dans votre organisation.

Qui peut utiliser cette fonctionnalité ?

Organization owners can restrict repository visibility changes for an organization.

You can restrict who has the ability to change the visibility of repositories in your organization, such as changing a repository from private to public. For more information about repository visibility, see About repositories.

Restricting who has the ability to change the visibility of repositories in your organization helps prevent sensitive information from being exposed. For more information, see Best practices for preventing data leaks in your organization.

Setting a blanket policy

You can restrict the ability to change repository visibility to organization owners only, or you can allow anyone with admin access to a repository to change visibility.

Warning

If this setting is enabled, individuals or GitHub Apps with admin access can modify the visibility of an existing repository even if the ability to create a repository with that specific visibility has been disabled. For more information about restricting the visibility of repositories during creation, see Restricting repository creation in your organization.

  1. In the upper-right corner of GitHub, select your profile photo, then click Your organizations.
  2. Next to the organization, click Settings.
  3. In the "Access" section of the sidebar, click Member privileges.
  4. Under "Repository visibility change", deselect Allow members to change repository visibilities for this organization.
  5. Click Save.

Setting a more flexible policy (public preview)

You can create a repository policy to govern who can create repositories in your organization, how new repositories must be named, and which visibilities are available. Compared to "member privilege" policies, repository policies give you more flexibility over which users are affected and which repositories are targeted. See Governing how people use repositories in your organization.