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. |
Create the repositories
Section titled “Create the repositories”api() { curl -fsS -H "Authorization: Bearer $ADMIN" -H 'Content-Type: application/json' "$@"; }E=https://entrepot.example.com
# your own filesapi -X POST $E/api/v1/repositories -d '{"name":"files","format":"raw","kind":"hosted","blobStore":"default"}'
# a cache of an upstream download siteapi -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.
Upload, download, list, delete
Section titled “Upload, download, list, delete”# upload (hosted): the path is whatever you choosecurl -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 listingcurl -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/wget --user token --password "$ENTREPOT_TOKEN" \ https://entrepot.example.com/repository/files/releases/1.4.0/app.tar.gzcurl -fsS -H "Authorization: Bearer $ENTREPOT_TOKEN" \ -F file=@app.tar.gz -F path=releases/1.4.0/app.tar.gz \ https://entrepot.example.com/api/v1/repositories/files/uploadpath defaults to the file name.
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.
From GitLab CI
Section titled “From GitLab CI”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.
Troubleshooting
Section titled “Troubleshooting”401 authentication requiredon download — the repository isn’t anonymously readable; pass-u token:$ENTREPOT_TOKENor a Bearer header.409on upload — the path already exists. Upload to a new path (versioned directories work well) or enablehosted.allowRedeploy.- A proxy returns an old file — proxied artifacts never expire by
default. If the upstream changes files in place, set
proxy.contentTtlSeconds.