skip to content

Repository Managers

Repository managers host, proxy and group artifacts for a whole organisation. Interviewers ask how you would lay out repositories, control who can publish, and keep the service up.

on this pageshow

questions

5

In a repository manager such as Nexus Repository or Artifactory, what are hosted, proxy and group repositories, and what is each one for?

level: juniorimportance: must knowfreq 72%

answer

  1. authoritative copy vs cached copy
  2. one upstream per proxy
  3. one URL over many members
  4. local, remote, virtual in Artifactory
  5. Harbor: normal vs proxy cache project

basics

~20 s

A hosted repository stores the artifacts your organisation publishes as the authoritative copy; a proxy repository caches what clients fetch from one remote repository; a group repository puts several repositories of one format behind a single URL.

solid answer

~50 s

Nexus Repository uses the words **hosted**, **proxy** and **group**; Artifactory calls the same roles **local**, **remote** and **virtual**. A hosted (local) repository is where internal builds are published, and the repository manager is the authoritative source for what it holds. A proxy (remote) repository points at one upstream, such as Maven Central or the npm registry: on a cache miss it fetches the file, stores it and serves it, so later requests stay inside your network, and you cannot publish into it. A group (virtual) repository adds no artifacts of its own; it aggregates members of one format behind one URL, so builds configure a single address and admins can add members without touching clients. Harbor covers the first two roles with projects: a normal project you push to, and a proxy cache project that caches a target registry and refuses pushes.

go deeper

for a junior

Name the three roles and what each holds: your own releases, a cache of one upstream, and one URL over several repositories. Add the Artifactory words local, remote and virtual.

for a middle

Explain how a request flows: client hits the group, the manager searches members, a proxy miss fetches from upstream and caches. Mention that formats are fixed per repository and per group.

for a senior

Show you can lay repositories out for real teams: hosted repositories per team or release type, one shared proxy per upstream, one group per format as the only URL builds use, and why publishing goes to hosted directly.

for a principal

Discuss how the layout scales across hundreds of teams: naming conventions, who may create repositories, and how much isolation per team is worth in administration effort and in search cost inside each group.

## Why a repository manager exists A **repository manager** is a server that stores, caches and serves build artifacts for a whole organisation: Maven JARs, npm tarballs, PyPI wheels, NuGet packages, Helm charts, container images. Without one, every build talks straight to public registries and every team invents its own place to put internal releases. With one, all of that traffic goes through a single service that the organisation controls, secures and keeps available. Almost every repository manager organises its storage around three **repository types**, each with a different job. The words differ between products, but the roles are the same. ## The three roles - **Hosted repository** - the *authoritative* home of artifacts your organisation produces. CI publishes internal releases here, and you can also upload third-party files that exist on no public registry (a vendor's driver, for example). Nothing else holds the original. - **Proxy repository** - a *caching front* for exactly one remote repository, such as Maven Central, the npm registry, PyPI or Docker Hub. When a client asks for a file the proxy does not hold, the repository manager fetches it from the remote, stores it locally and serves it. Later requests are answered from the cache, so builds keep working faster and with less outbound traffic. You do not publish into a proxy: Artifactory's documentation says you can remove cached artifacts from a remote repository but cannot deploy a new artifact into one. - **Group repository** - an *aggregate* that puts several repositories behind one URL. Clients configure a single address; the repository manager searches the members on their behalf. Administrators can add or remove members without changing a single build file. A group holds no published artifacts of its own; it is a view over its members. Artifactory states this directly for its virtual repositories: they aggregate local, remote and other virtual repositories of the same package type and do not store artifacts themselves. ## The same roles in each product's words | Role | Nexus Repository | Artifactory | Harbor | |---|---|---|---| | Authoritative store | hosted | local | a normal (public or private) project | | Cache of an upstream | proxy | remote | a proxy cache project | | One URL over many | group | virtual | no direct counterpart among its project types | A few details matter when you use these words in an interview: 1. **Format is fixed per repository.** In Artifactory you must choose a package type when you create a repository, and it cannot be changed later. Typed virtual repositories can include only repositories of the same type; a Generic virtual repository can aggregate any type but keeps no package metadata, so it cannot stand in for a Maven or npm endpoint. Nexus groups are likewise defined per format, such as a group of `maven2` repositories. 2. **Defaults show the pattern.** Nexus Repository ships `maven-releases` and `maven-snapshots` as hosted repositories, a proxy of the Central Repository, and the `maven-public` group that combines all three so developers use one URL. 3. **Harbor is container-first.** A Harbor project holds the repositories of an application, and role-based access is applied per project. A proxy cache project behaves like a normal project except that you cannot push images to it; when an image is not cached, Harbor pulls it from the target registry, serves it and keeps it. 4. **Artifactory adds a fourth type.** Federated repositories synchronise their contents with Federated repositories at other sites in the same Federation. ## How the roles fit together A typical layout for one format looks like this: - one or more **hosted** repositories for internal releases (often split by team or by release vs snapshot); - one **proxy** per public upstream, shared by everyone; - one **group** that combines them, and that is the only URL builds are given. Developers resolve everything, internal and public, from the group. CI publishes to a hosted repository directly. The group's own search order across members is a separate subject; it differs by product and affects which copy a client receives when two members hold the same name. ## Common confusions - Treating a group as a third copy of the data. It is a view; disk is used by the hosted repositories and the proxy caches. - Expecting a proxy to mirror an entire upstream in advance. A proxy caches on demand, file by file, as clients ask. - Publishing internal releases into a proxy. The proxy's content comes from its upstream; internal artifacts belong in a hosted repository. - Assuming one aggregate URL can serve Maven, npm and PyPI clients at once. Each ecosystem has its own layout and metadata, so each needs its own group. Knowing the three roles, and each product's word for them, is the base vocabulary for every other repository-manager question: permissions, replication, retention and high availability are all configured per repository.

  • Why give builds the group URL instead of the hosted and proxy URLs directly?
    One address covers internal and public artifacts, so build files never change when a member is added, replaced or split. Access can be granted at the group, and the platform team can reorganise hosted repositories behind it without touching hundreds of projects. The cost is that the client no longer sees which member answered, so diagnosing a wrong copy means asking the repository manager, not the build log.
  • In Artifactory, where does an artifact land if a client deploys to a virtual repository's URL?
    A virtual repository holds no artifacts itself, so the deploy is routed to the local repository named in the virtual repository's Default Deployment Repository setting. Reads through the virtual URL then find it in that local member. Choosing that target deliberately matters: it decides which team's hosted repository, permissions and retention apply to whatever gets published through the shared URL.

A hosted repository is the shelf of books your own staff wrote; a proxy repository is an inter-library loan desk that keeps a copy of every book it borrows; a group is the single front counter that checks both for you but owns no books itself.

  • A group repository is a third copy that stores everything its members hold.
  • A proxy repository downloads the whole upstream registry in advance.
  • Internal releases can be published straight into a proxy repository's cache.
  • One group repository can serve Maven, npm and PyPI clients through a single URL.
  • Hosted, proxy and group are Nexus-only ideas with no equivalent in Artifactory.
open as a page

In a repository manager, how do you scope read, deploy and delete rights, and why should CI publish with a token, not a password?

level: middleimportance: must knowfreq 58%

basics

~20 s

Grant rights per repository: wide read, deploy only to the hosted repositories a team owns, delete and admin to few. CI publishes as a dedicated non-human identity with a scoped, expiring, revocable token, so no person's password lives in pipelines.

open as a page

Two Artifactory sites push-replicate the same local repositories to each other, and disk use keeps climbing at both; what is wrong, and how should cross-site sync work instead?

level: seniorimportance: should knowfreq 38%

basics

~20 s

This is cyclic replication, which Artifactory warns can lose data or grow disk use exponentially. Give each repository one direction: push from the owning site, pull to many sites, or use Federated repositories built for multi-site synchronisation.

open as a page

Three open-source distribution registry nodes share storage behind a load balancer; pulls work but pushes fail intermittently. What is the likely cause, and what must every node share?

level: seniorimportance: should knowfreq 30%

basics

~20 s

Each node generated its own HTTP secret because http.secret was unset, so an upload begun on one node fails when its next request reaches another. Nodes need the same storage and http.secret, and should share any configured cache.

open as a page

Would you give a 300-engineer company one repository manager for Maven, npm, PyPI and container images, or one per ecosystem, and how would you lay out its repositories?

level: principalimportance: should knowfreq 42%

basics

~20 s

No single right answer: one manager gives one identity model, audit trail and HA cluster but one blast radius; separate ones isolate outages but multiply operations. Either way, use typed per-team repositories behind one group URL per format.

open as a page