Raw Files over HTTP from a Maven Repository
Upload any file with curl and download it from the same URL. A Maven repository stores a file at any path you name and returns it from that path. The file does not have to look like a Maven artifact.
Every feature on every plan, from $99/month billed annually.
14 days free. No credit card required.
Serving developers since 2016 Founder-run, no venture capital
machine your-org.mycloudrepo.io
login you@example.com
password YOUR_REPOSITORY_TOKEN curl --netrc -T my-app-1.1.0.tar.gz https://your-org.mycloudrepo.io/repositories/your-repo/my-app/1.1.0/
curl --netrc -O https://your-org.mycloudrepo.io/repositories/your-repo/my-app/1.1.0/my-app-1.1.0.tar.gz Included on every plan
Plans differ only in storage and transfer allowance.
How a Maven repository serves a raw file
Each line below is how a repository URL behaves, as the raw files guide documents it.
- Upload with PUT curl --upload-file sends a PUT of the file exactly as it is, and CloudRepo answers 200 with no body.
- Download from the same path A GET at the path you uploaded to returns the file. Every download is served as application/octet-stream, whatever type the upload named.
- Check without downloading A HEAD request answers 200 with a content-length header when a file is stored, and 404 Not Found when nobody stored that path.
- Any path, up to 50 GB Paths use letters, digits and + _ - . ! * ' ( ) / @ ~, and your organization, repository and path together can be up to 1,024 characters. One file can be up to 50 GB; a larger file is refused with 413.
- Repository tokens Sign in with a repository token that has Download and publish packages access. The username is the email address of the account that created the token, and the password is the token. A Download packages token cannot upload: it gets 403.
- Overwrite Protection A new repository has Overwrite Protection on, so a second upload to a path that already holds a file is refused with 409 Conflict. Put each version at its own path, such as builds/1.4.0/app.tar.gz.
Know the edges before you build on it
What a repository URL does not do, and how to work with it.
- Delete in the portal A repository URL has no DELETE: it answers 405 Method Not Allowed. Delete files in the portal.
- PUT, never POST A repository URL accepts only GET, HEAD and PUT. Send a file with --upload-file, because --data makes curl send a POST.
- Listings are HTML A directory listing is an HTML page with each name, its last modified time and its size, for a browser or any client that sends Accept: text/html. The portal lists files in its file browser.
- Public reads are opt-in To let anyone read a repository's files, turn on its Public Access card. Reads then work without credentials at https://your-org.mycloudrepo.io/public/repositories/your-repo/ followed by the path. Writes still need a token.
Upload, download and check a file
Four steps with curl. Replace your-org and your-repo with your organization and your repository.
Create a Maven repository and a token
Create a repository and choose Maven. Then create a repository token with Download and publish packages access to it. curl reads the credential from ~/.netrc, so it never appears on a command line. Keep the file readable by you alone (chmod 600 ~/.netrc).
machine your-org.mycloudrepo.io
login you@example.com
password YOUR_REPOSITORY_TOKEN Upload a file
Make a file, then send it with --upload-file, which sends a PUT of the file exactly as it is. curl exits 0 and CloudRepo answers 200 with no body.
echo 'Hello from CloudRepo.' > hello.txt
curl --netrc --fail --upload-file hello.txt \
https://your-org.mycloudrepo.io/repositories/your-repo/uploads/hello.txt Download a file and check one
The address of a file is the repository URL plus the path you chose, with no leading slash. Ask for the headers alone to check that a file exists without downloading it.
curl --netrc --fail --output hello-copy.txt \
https://your-org.mycloudrepo.io/repositories/your-repo/uploads/hello.txt
curl --netrc --fail --head \
https://your-org.mycloudrepo.io/repositories/your-repo/uploads/hello.txt List a directory
The listing is an HTML page with each name, its last modified time and its size. A client that asks for a path ending in / and sends Accept: text/html gets it.
curl --netrc --fail --header 'Accept: text/html' \
https://your-org.mycloudrepo.io/repositories/your-repo/uploads/ Keep reading
The raw files guide lists every error a request can get and what to do about each.
- Raw files guide Every command on this page, the errors a request can get, and what to do about each. Read the guide
- Maven Repository The same repository publishes and resolves Maven artifacts. Maven hosting
- Repository tokens Create the token you sign in with, and see how to authenticate with it. Create a token
The examples use curl, so they work from any shell, script or CI job.
Every plan includes human support and SSO. See pricing
Ready to simplify your artifact storage?
14 days free. No credit card required.
Starting at $99/month billed annually.
Founder-run since 2016, with no venture capital. A real person answers within one business day. Usually it's me.
Chris, founder of CloudRepo