Skip to content

Raw files

Raw repositories store files at arbitrary paths: release tarballs, installer binaries, firmware, test fixtures, anything you can curl.

Kind Behaviour
hosted PUT a file to any path; GET it back; DELETE a file or a whole directory.
proxy GET /repository/<name>/<path> fetches <remoteUrl>/<path> on first request and caches it.
group Returns the first member that has the file.
Terminal window
api() { curl -fsS -H "Authorization: Bearer $ADMIN" -H 'Content-Type: application/json' "$@"; }
E=https://entrepot.example.com
# your own files
api -X POST $E/api/v1/repositories -d '{"name":"files","format":"raw","kind":"hosted","blobStore":"default"}'
# a cache of an upstream download site
api -X POST $E/api/v1/repositories -d '{
"name": "nodejs-dist", "format": "raw", "kind": "proxy", "blobStore": "default",
"anonymousRead": true,
"proxy": {"remoteUrl": "https://nodejs.org/dist"}
}'

A proxy of https://nodejs.org/dist serves https://entrepot.example.com/repository/nodejs-dist/v22.11.0/node-v22.11.0-linux-x64.tar.xz from https://nodejs.org/dist/v22.11.0/node-v22.11.0-linux-x64.tar.xz.

Terminal window
# upload (hosted): the path is whatever you choose
curl -fsS -H "Authorization: Bearer $ENTREPOT_TOKEN" -T app.tar.gz \
https://entrepot.example.com/repository/files/releases/1.4.0/app.tar.gz
# download (hosted, proxy or group)
curl -fLO -u token:$ENTREPOT_TOKEN \
https://entrepot.example.com/repository/files/releases/1.4.0/app.tar.gz
# directory listing
curl -u token:$ENTREPOT_TOKEN https://entrepot.example.com/repository/files/releases/
# delete a file, or a directory (trailing slash)
curl -X DELETE -H "Authorization: Bearer $ENTREPOT_TOKEN" \
https://entrepot.example.com/repository/files/releases/1.4.0/

Downloads support Range, If-None-Match and HEAD, so resumable downloads and cache validation work. Files can also be uploaded and browsed in the UI.

Raw uploads are limited to 10 GiB per file. Re-uploading an existing path is rejected with 409 unless the repository has hosted.allowRedeploy: true.

upload:
image: curlimages/curl:latest
id_tokens:
ENTREPOT_ID_TOKEN:
aud: https://entrepot.example.com
script:
- 'curl -f -H "Authorization: Bearer $ENTREPOT_ID_TOKEN" --upload-file dist/app.tar.gz "https://entrepot.example.com/repository/files/$CI_PROJECT_PATH/$CI_COMMIT_SHORT_SHA/app.tar.gz"'

The job needs a trust policy bound to a role with write on files.

  • 401 authentication required on download — the repository isn’t anonymously readable; pass -u token:$ENTREPOT_TOKEN or a Bearer header.
  • 409 on upload — the path already exists. Upload to a new path (versioned directories work well) or enable hosted.allowRedeploy.
  • A proxy returns an old file — proxied artifacts never expire by default. If the upstream changes files in place, set proxy.contentTtlSeconds.