Skip to content
Select theme
  • Auto
  • Dark
  • Light

Raw files

A raw repository stores any file at any path. Use it for tarballs, installers, configuration bundles and other files that have no package format.

https://repo.example.com/raw/<repo>/<path>

The path can have any depth. The server keeps the path as you write it.

An upload is a PUT with a publish session token as the password. Get a token from the UI or from CI. See Publishing overview.

Terminal window
curl -f -u publish:SESSION_TOKEN \
-T app-1.2.0.tar.gz \
https://repo.example.com/raw/downloads/app/app-1.2.0.tar.gz

Use -f so that curl fails on an HTTP error.

Terminal window
curl -fL -O https://repo.example.com/raw/downloads/app/app-1.2.0.tar.gz

For a private repository, add a read token:

Terminal window
curl -fL -u ci:READ_TOKEN -O https://repo.example.com/raw/downloads/app/app-1.2.0.tar.gz

HEAD works too. On S3 storage with s3.redirect on, a GET answers 302 to a presigned URL, so use -L.

Each raw repository has one policy in its config:

{"overwrite": "deny"}
Policy New path Same bytes Different bytes
deny (default) 201 200 409
allow 201 200 200, the file is replaced

A PUT with identical bytes always succeeds, so a retry is safe. A file larger than max_upload_bytes gets 413.

An admin sets the policy in the repository config when they create the repository. They can change it later with PATCH /api/repos/<repo> and a new config. See HTTP API.

  • Writes need a publish session. A password or a read token on a PUT gets 401.
  • No directory listing over HTTP. Use the web UI to list files by path prefix.
  • A mirrored repository is read only until you cut over from Nexus. See Nexus migration.