raw repositories store arbitrary files: release archives, models, documents. The examples use the conventional name raw-hosted.

Publishing

Upload a file with a PUT request to the desired path:

curl -u <USERNAME>:<PASSWORD> -T release.tar.gz \
  https://<GALLEON_HOST>/repository/raw-hosted/releases/v1.0.0/release.tar.gz

The response carries checksum headers (X-Checksum-Sha256 and others). Uploading is also available through the web interface — the “Upload” section.

Downloading and deleting

Downloading and deleting a file:

curl -u <USERNAME>:<PASSWORD> -O https://<GALLEON_HOST>/repository/raw-hosted/releases/v1.0.0/release.tar.gz
curl -u <USERNAME>:<PASSWORD> -X DELETE https://<GALLEON_HOST>/repository/raw-hosted/releases/v1.0.0/release.tar.gz

Checksums are returned in the X-Checksum-* headers on download and upload. A separate checksum file (for example, file.tar.gz.sha256) is available only if it was uploaded as a standalone file.

Proxy repositories

A raw repository can also be a caching mirror of an external HTTP source: files are downloaded with the same GET paths, while uploading and deleting are unavailable. The starter set example is go-sumdb, the proxy repository of the Go checksum database.

Specifics

Format specifics:

  • How the browser handles the files (display or save) is set by the administrator in the repository settings. In repositories with the inline display mode, publishing HTML, SVG, and JavaScript files is rejected for security reasons.
  • If the repository write policy forbids overwriting, re-uploading to an existing path is rejected with 409.
  • Constructs like .., control characters, and a number of special characters are rejected in paths.