You can set the default visibility for all new repositories created via the web interface on your GitHub Enterprise appliance to be private or public.

When people create new repositories on your GitHub Enterprise instance they can set the repository visibility to public or private but as a site admin you can choose the default selected option on the "Create a new repository" page.

private or public setting for new repositories

If the visibility setting defaults to private, then when people on your GitHub Enterprise instance create new repositories they must intentionally select public if they want their repository visible to others on your GitHub Enterprise instance who don't have direct access to the repository.

When a person sets a repository's visibility to private, only people with access to the repository can see the new repository.

Note: New repositories created through the API will still be publicly visible by default because these default visibility settings only apply to new repositories created on the "Create a new repository" page.

  1. Sign in to your GitHub Enterprise instance at http(s)://[hostname]/login.

  2. In the left sidebar, click Admin center. Admin Center tab

  3. Under "Default repository visibility", select private or public. shows default repository visibility setting

Warning: If you add an image attachment to a pull request or issue comment, anyone can view the anonymized image URL without authentication, even if the pull request is in a private repository, or if private mode is enabled. To keep sensitive images private, serve them from a private network or server that requires authentication.