Quader Docs 0.176.0

Remote repositories

Point a remote repository at its upstream, test the connection, tune its cache, mirror the upstream and choose what it delivers.

On this page

A remote repository serves what its cache holds and fetches the rest from its upstream when a client first asks. Background work fills the same cache ahead of the clients.

Upstream, cache and mirrorA client asks a remote repository for a version; the delivery rules refuse it or let it through; a version in the cache is served from it, any other is fetched from the upstream, stored and served. Mirror passes, downloads ahead and syncs fetch and store in the background.noyesyesnoA client asksfor a versionDelivered bythe rules?403, withwhere to askIn the cache?Served fromthe cacheFetched fromthe upstreamand storedMirror passes,downloadsahead, syncs

The upstream of a remote repository

Who
the project's Owner, and holders of repositories:write-config; the mirror's mode and bounds need repositories:write-config
Formats
npm, NuGet, OCI, Debian, Ansible Galaxy

The group Upstream of the creation form, and the open section of the settings page:

Part What it does
Well-known registries One button per public registry of the format; the first is the default. OCI offers Docker Hub, Quay, GitHub (ghcr.io) and GitLab
Registries of this installation The organization's own registries an administrator keeps (Upstream registries); in the creation form only
Upstream URL http or https, without user information; plain http is saved with a warning
Authentication None, Username and password or Bearer token; the line under the password names every host that receives it
Upstream details Further hosts, each with Receives the credential; Metadata cache period in seconds and Negative cache period in seconds; Start the download when a version is asked for (Downloads into a remote's cache); on the settings page Offline
Offline The upstream is not contacted; stored content is served, anything else answers 404 not_cached_offline

A pressed registry brings its further hosts (Docker Hub auth.docker.io, GitLab gitlab.com, both receiving the credential). The cache periods start at the format's values, which the format pages name.

The password is write-only. It is sealed when saved and never shown again: leave the field empty to keep it, type one to replace it, or tick Remove the stored password. A change of the URL, the hosts or the credential discards the cached metadata and the remembered misses; stored files stay.

Test connection

Test connection sends the section as it stands, saved or not, with the password you typed, never the stored one. The answer says in words whether the upstream answered and whether it accepted the credentials, then the HTTP status, the duration, the certificate and a failure's code (dns_error, tls_untrusted, egress_denied, foreign_host_denied). Technical details hold the upstream's own answer. Each person has 60 tests, refilled at 60 an hour; above that the test answers 429 with the time to wait.

A container registry's test logs in as a client does. When its token service is on a host the repository does not list, as on a self-managed GitLab, the test offers Allow for that host. Allow it only when it is the registry's own token service.

Mirror

Every remote has the closed section Mirror. Pull-through, the default, stores what clients ask for; Mirror also stores, in background passes, every package the delivery rules and these bounds admit:

Setting Default Range
Mirror only these packages empty: every delivered package name patterns, at most 100, such as @types/*
Pass interval in seconds 3600 300 to 604,800
Full pass interval in seconds 604800 0, or 86,400 to 7,776,000
Discovery Automatic Change feed, Listing, Names list
Concurrent fetches 4 1 to 64; clients always come first
Versions per package 0: all 0 to 10,000
Include prerelease versions on
Storage limit in bytes empty: none of its own at least 1,048,576
Paused off no pass starts

A mirror of a well-known registry's address needs a bound: patterns that each start with a literal part (@types/*, not * or @*/*), or a storage limit. The server refuses it otherwise; any other upstream saves with a warning. An Owner without repositories:write-config may pause a mirror or turn it back to pull-through, nothing more.

The status of a mirror

Mirror status heads the open section and reads itself again, every 5 seconds while a pass runs:

State Meaning
Off Pull-through; no pass runs
Paused No pass starts
No bound A well-known registry without patterns or a limit: no pass runs until it has one
Scheduled The next pass starts when due
Running, Waiting A pass is in progress; Waiting after a rate limit, a failure or a release
Bound reached The storage limit, a quota or the store's capacity stops additions
Failing Three or more passes in a row failed

Under it stand the pass in progress, the last complete pass, the next pass, the last error with its code, the rate-limit waits and the bound. With repositories:write-config or as the project's Owner, Pause, Resume and Run a pass now act at once; its arrow offers Run a full pass. A Maintainer asks for a pass through the API (POST …/mirror/run). Anyone without repositories:write-config may ask 10 minutes after the last pass ended (mirror_pass_too_soon). The pass is a job of kind mirror-pass (Monitor).

Delivery of a remote repository

The closed section Delivery holds the mode and the examination; the rules, requests and downloads are on the tab Upstream (Curating a remote repository). A system repository of the project Upstream has none.

Setting Default What it does
Delivery mode Everything except what is blocked Only what is allowed delivers nothing without an allow rule
Fetch for examination when someone asks on A request downloads at once, charged to the asker, so it is scanned before anyone decides
Remove what was examined and not allowed after this many days 30 1 to 365

A rule binds administrators too. A refused client gets 403 not_allowed_in_repository with a link to the tab; a virtual repository goes on to its next member.