Skip to content

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).

Terminal window
# 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 Debian
api -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.

  1. Trust the repository’s signing key

    Terminal window
    sudo install -d -m 0755 /etc/apt/keyrings
    curl -fsSL https://entrepot.example.com/repository/apt-internal/public.gpg \
    | sudo tee /etc/apt/keyrings/entrepot-apt-internal.gpg >/dev/null

    public.gpg is a binary keyring for signed-by; public.key is the same key ASCII-armored. For a private repository add -u token:$ENTREPOT_TOKEN.

  2. Add credentials (private repositories only)

    /etc/apt/auth.conf.d/entrepot.conf
    machine entrepot.example.com/repository/apt-internal/
    login token
    password <TOKEN>
    Terminal window
    sudo chmod 600 /etc/apt/auth.conf.d/entrepot.conf
  3. Add the source

    /etc/apt/sources.list.d/entrepot.sources
    Types: deb
    URIs: https://entrepot.example.com/repository/apt-internal
    Suites: stable
    Components: main
    Signed-By: /etc/apt/keyrings/entrepot-apt-internal.gpg
  4. Install

    Terminal window
    sudo apt-get update && sudo apt-get install mypkg

A proxy serves the upstream’s own signed metadata, so keep using the distribution’s keyring:

/etc/apt/sources.list.d/debian.sources
Types: deb
URIs: https://entrepot.example.com/repository/debian
Suites: bookworm bookworm-updates
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Release 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.

Terminal window
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"

Packages 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.

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"'

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.

  • NO_PUBKEY / The repository is not signed — the keyring in signed-by is missing or stale. After a key rotation clients must fetch the new public.gpg.
  • 401 Unauthorized — the machine line in auth.conf.d must 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 — Release files are cached for proxy.metadataTtlSeconds (default 3600) before they are revalidated.