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
Who can see a public repository?
- Only the repository owner
- Only members of the owning organization
- Only people with a paid plan
- 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.
Which statements about repository visibility are correct?
- Users with admin permission on a repository can change its visibility
- Organization owners always have access to every repository in the organization
- Internal repositories are available for organizations owned by an enterprise account on Enterprise Cloud
- Enabling branch protection makes a public repository private
- 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: 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.
