Bitzu

GH-900 ยท Security and administration

Repository visibility and privacy

Public, private and internal repositories, who can see each, and changing visibility.

Key points

  • Public repositories are visible to everyone on the internet.
  • Private repositories are visible only to you, people you give access to and, for organization repos, certain organization members.
  • Internal repositories exist only in organizations owned by an enterprise account on GitHub Enterprise Cloud and are meant for sharing inside the company.
  • Someone with admin permission can change visibility, and organization owners always have access.

Source: https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories

Practice questions

Single choice

Who can see a public repository?

  1. Only the repository owner
  2. Only members of the owning organization
  3. Only people with a paid plan
  4. Everyone on the internet
Show answer

Answer: D. Everyone on the internet

Public repositories are accessible to everyone on the internet. Private is the setting that limits access to selected people.

Select all that apply

Which statements about repository visibility are correct?

  1. Users with admin permission on a repository can change its visibility
  2. Organization owners always have access to every repository in the organization
  3. Internal repositories are available for organizations owned by an enterprise account on Enterprise Cloud
  4. Enabling branch protection makes a public repository private
  5. A private repository can be viewed by anyone who has its URL
Show answer

Answer: A. Users with admin permission on a repository can change its visibility, B. Organization owners always have access to every repository in the organization, C. Internal repositories are available for organizations owned by an enterprise account on Enterprise Cloud

Admins can change visibility, owners always see org repos, and internal repos are an Enterprise Cloud feature. Branch protection has nothing to do with whether a repository is public.

True or false

True or false: making a repository private is enough to guarantee that secrets committed earlier were never exposed.

Show answer

Answer: False

False. Anyone who already cloned or saw it while public may have the secrets, so exposed credentials must be rotated. Visibility only controls future access.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More GH-900 topics in this module