Skip to content
Source

Who can see a monorepo

Your public library and your private service belong in one monorepo. But people who see only the library must never see the private code, and they must not learn that the private repository exists.

The forge has one rule for this: a person can see a monorepo only when they can see every private member. So everyone who sees the monorepo can see all of it.

The rules

  • A public monorepo has public members only.
  • A private monorepo can have public and private members.
  • A person sees a private monorepo only while they can read the monorepo and every private member.

Each member keeps its own access. A public member stays public, and its page does not name the monorepos that it is in.

An example

acme/platform is private. Its members are acme/web (public) and acme/billing (private).

PersonAccessSees acme/platform
AliceOwner of acmeYes
WendyRead on acme/platform and on acme/billingYes
OscarWrite on acme/platform, nothing on acme/billingNo
RitaRead on acme/billing onlyNo

Oscar gets the normal "not found" page for acme/platform. He still sees acme/web, because it is public.

1. Make a private monorepo with a private member

  1. Make the monorepo private first, in its Settings.
  2. In its Settings, under Monorepo, click Members and add the private repository. See Make a monorepo.

A public monorepo refuses a private member.

2. Give people access

Give each person read access to the monorepo and to each private member. For a team, give the same access to the team on each repository. See Bring your team.

A person who misses access to one private member cannot see the monorepo.

Done

People with access to all private members see the monorepo, its members and its search. Everyone else sees only the public members, as normal repositories.

What the forge refuses

  • Make a monorepo public while it has a private member: the forge refuses. Remove the private members, or make them public first.
  • Make a member of a public monorepo private: the forge refuses. Remove it from the monorepo first. The message names the monorepo, because a public monorepo is visible to all.
  • Add a private member to a public monorepo: the forge refuses.

When access changes

  • A person who loses read access to one private member loses the monorepo at their next request.
  • An admin who removes a member that they cannot read gets the answer "not a member". A guessed name confirms nothing.
  • Agent sessions and scoped tokens follow the same rule. They never get more access than their person. See Give an agent a monorepo.