Raw File
Use a Raw File registry to store and retrieve arbitrary files by path. Common file types include archives (.zip, .tar, .tar.gz), Windows binaries (.exe, .dll, .msi), PowerShell scripts, JARs, test reports, configuration files, and plain binaries. You upload, download, inspect, and delete files with HTTP requests and curl.
Prerequisites
Access to a Harness account with appropriate permissions to create registries and connectors.
Create a Raw File Artifact Registry
Navigate to the Artifact Registry module in your Harness project.
Click on New Artifact Registry.
In the Registry Type dropdown, select Raw File registry (or Raw File).
Provide a Registry Name.
Optionally, add a Description and Labels for better organization.
Choose visibility between Public and Private.
Click Create Registry to finalize.
Configure an Upstream Proxy (Optional)
An upstream proxy allows your registry to fetch artifacts from external sources if they are not available locally.
Create an upstream proxy
In the Artifact Registry module, click the dropdown next to New Artifact Registry and select Upstream Proxy.
Choose Raw File registry (or Raw File) as the proxy type.
Click Create Proxy to establish the connection.
For remote URL, authentication, and other options, go to Create an upstream proxy.
Configure the upstream proxy in your registry
In the Artifact Registry module, select an existing Raw File Artifact Registry.
Select the Configuration tab.
Under Advanced (Optional), select Configure Upstream.
Select from the list of compatible proxies to add them to your registry.
Click Save to save the configuration.
Raw File Client Setup
Follow these instructions to upload, download, and manage files in your Raw File registry using curl commands.
Generate Identity Token
An identity token will serve as the password for uploading and downloading artifacts.
Navigate to your Harness project.
Go to Artifact Registry and select your Raw File registry.
Click on Setup Client or Authentication.
Generate an identity token (API key) that you'll use in the commands below.
File Operations
These operations support both nested and flat file paths, allowing you to organize files using directory structures in the path.
The placeholders below apply to every command unless noted.
Parameters:
<ACCOUNT_ID>: Your account identifier<REGISTRY_NAME>: Name of your registry<FILE_PATH>: Path of the file in the registry (supports nested paths, for exampleconfig/prod/settings.json)<API_KEY>: Your generated identity token<LOCAL_FILE_PATH>: Local path to the file you upload (upload command only)
Upload a file to a specific path
Use this curl command to upload a file:
Download a file from a specific path
Use this curl command to download a file:
Get file metadata
Retrieve file metadata using a HEAD request:
Delete a file
Delete a file from a specific path in the registry:
To complete the in-product flow, click Done in Setup Client.
Last updated
Was this helpful?