Apt (Debian / Ubuntu)
| Kind | Behaviour |
|---|---|
| hosted | Accepts .deb uploads and regenerates Packages, Release, and a signed InRelease / Release.gpg on every upload and delete, with a key Entrepot manages per repository. |
| proxy | Caches dists/ and pool/ of an upstream archive byte for byte, so the upstream signatures stay valid and clients keep using the upstream keyring. |
Apt group repositories are not available yet (merged metadata would have to be re-signed).
Create the repositories
Section titled “Create the repositories”# your own packages, published as "stable main" and "testing main"api -X POST $E/api/v1/repositories -d '{ "name": "apt-internal", "format": "apt", "kind": "hosted", "blobStore": "default", "hosted": {"apt": {"distributions": [ {"name": "stable", "components": ["main"], "architectures": ["amd64", "arm64", "all"], "origin": "Acme", "label": "Acme internal"}, {"name": "testing", "components": ["main"]} ]}}}'
# a cache of Debianapi -X POST $E/api/v1/repositories -d '{ "name": "debian", "format": "apt", "kind": "proxy", "blobStore": "default", "anonymousRead": true, "proxy": {"remoteUrl": "http://deb.debian.org/debian"}}'Without hosted.apt.distributions, any distribution and component may be
uploaded to (default stable / main) and the architectures are derived
from the uploads. Packages with architecture all are listed in every
binary-<arch> index.
Configure apt (hosted repository)
Section titled “Configure apt (hosted repository)”-
Trust the repository’s signing key
Terminal window sudo install -d -m 0755 /etc/apt/keyringscurl -fsSL https://entrepot.example.com/repository/apt-internal/public.gpg \| sudo tee /etc/apt/keyrings/entrepot-apt-internal.gpg >/dev/nullpublic.gpgis a binary keyring forsigned-by;public.keyis the same key ASCII-armored. For a private repository add-u token:$ENTREPOT_TOKEN. -
Add credentials (private repositories only)
/etc/apt/auth.conf.d/entrepot.conf machine entrepot.example.com/repository/apt-internal/login tokenpassword <TOKEN>Terminal window sudo chmod 600 /etc/apt/auth.conf.d/entrepot.conf -
Add the source
/etc/apt/sources.list.d/entrepot.sources Types: debURIs: https://entrepot.example.com/repository/apt-internalSuites: stableComponents: mainSigned-By: /etc/apt/keyrings/entrepot-apt-internal.gpgTerminal window echo "deb [signed-by=/etc/apt/keyrings/entrepot-apt-internal.gpg] https://entrepot.example.com/repository/apt-internal stable main" \| sudo tee /etc/apt/sources.list.d/entrepot.list -
Install
Terminal window sudo apt-get update && sudo apt-get install mypkg
Configure apt (proxy)
Section titled “Configure apt (proxy)”A proxy serves the upstream’s own signed metadata, so keep using the distribution’s keyring:
Types: debURIs: https://entrepot.example.com/repository/debianSuites: bookworm bookworm-updatesComponents: mainSigned-By: /usr/share/keyrings/debian-archive-keyring.gpgRelease files are revalidated after proxy.metadataTtlSeconds; index files
are refetched whenever they no longer match the hashes in the cached
(In)Release, and pool/ and by-hash/ files are immutable.
Publish packages
Section titled “Publish packages”curl -fu token:$ENTREPOT_TOKEN -T mypkg_1.0_amd64.deb \ "https://entrepot.example.com/repository/apt-internal/mypkg_1.0_amd64.deb?distribution=stable&component=main"curl -fu token:$ENTREPOT_TOKEN \ -F file=@mypkg_1.0_amd64.deb -F distribution=stable -F component=main \ https://entrepot.example.com/repository/apt-internal/curl -fsS -H "Authorization: Bearer $ENTREPOT_TOKEN" \ -F file=@mypkg_1.0_amd64.deb -F distribution=stable -F component=main \ https://entrepot.example.com/api/v1/repositories/apt-internal/uploadPackages are stored at
pool/<component>/<prefix>/<package>/<package>_<version>_<arch>.deb. To
remove one, DELETE that path; the indexes are regenerated and re-signed.
Uploading the same package, version and architecture with different content
returns 409 unless hosted.allowRedeploy is enabled.
From GitLab CI
Section titled “From GitLab CI”publish-deb: image: curlimages/curl:latest id_tokens: ENTREPOT_ID_TOKEN: aud: https://entrepot.example.com script: - 'curl -f -H "Authorization: Bearer $ENTREPOT_ID_TOKEN" -T dist/$CI_PROJECT_NAME.deb "https://entrepot.example.com/repository/apt-internal/$CI_PROJECT_NAME.deb?distribution=stable&component=main"'Scanning
Section titled “Scanning”Set scan.distro (for example debian-12 or ubuntu-24.04) so scanners
can match .deb packages against the right distribution’s advisories. See
Vulnerability scanning.
Troubleshooting
Section titled “Troubleshooting”NO_PUBKEY/The repository is not signed— the keyring insigned-byis missing or stale. After a key rotation clients must fetch the newpublic.gpg.401 Unauthorized— themachineline inauth.conf.dmust include the repository path and the file must be readable by apt (chmod 600, owned by root).Release file … is not valid yet— the client’s clock is behind; check NTP.- New upstream packages don’t appear through a proxy —
Releasefiles are cached forproxy.metadataTtlSeconds(default 3600) before they are revalidated.