> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/artifact-registry/new-to-artifact-registry/quickstart/raw-file-quickstart.md).

# Raw File

{% @harness-package-selector/package-selector platforms="%5B%7B%22label%22%3A%22Docker%22%2C%22slug%22%3A%22docker%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fdocker-quickstart%22%7D%2C%7B%22label%22%3A%22Helm%22%2C%22slug%22%3A%22helm%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fhelm-quickstart%22%7D%2C%7B%22label%22%3A%22Helm%20HTTP%22%2C%22slug%22%3A%22helm-http%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fhelm-http-quickstart%22%7D%2C%7B%22label%22%3A%22Generic%22%2C%22slug%22%3A%22generic%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fgeneric-quickstart%22%7D%2C%7B%22label%22%3A%22Raw%20File%22%2C%22slug%22%3A%22raw-file%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fraw-file-quickstart%22%7D%2C%7B%22label%22%3A%22Maven%22%2C%22slug%22%3A%22maven%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fmaven-quickstart%22%7D%2C%7B%22label%22%3A%22Python%22%2C%22slug%22%3A%22python%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fpython-quickstart%22%7D%2C%7B%22label%22%3A%22NPM%22%2C%22slug%22%3A%22npm%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fnpm-quickstart%22%7D%2C%7B%22label%22%3A%22Nuget%22%2C%22slug%22%3A%22nuget%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fnuget-quickstart%22%7D%2C%7B%22label%22%3A%22RPM%22%2C%22slug%22%3A%22rpm%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Frpm-quickstart%22%7D%2C%7B%22label%22%3A%22Debian%22%2C%22slug%22%3A%22debian%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fdebian-quickstart%22%7D%2C%7B%22label%22%3A%22Alpine%22%2C%22slug%22%3A%22alpine%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Falpine-quickstart%22%7D%2C%7B%22label%22%3A%22Wolfi%22%2C%22slug%22%3A%22wolfi%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fwolfi-quickstart%22%7D%2C%7B%22label%22%3A%22Cargo%22%2C%22slug%22%3A%22cargo%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fcargo-quickstart%22%7D%2C%7B%22label%22%3A%22Conan%22%2C%22slug%22%3A%22conan%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fconan-quickstart%22%7D%2C%7B%22label%22%3A%22Go%22%2C%22slug%22%3A%22go%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fgo-quickstart%22%7D%2C%7B%22label%22%3A%22Hugging%20Face%22%2C%22slug%22%3A%22hugging-face%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fhugging-face-quickstart%22%7D%2C%7B%22label%22%3A%22Conda%22%2C%22slug%22%3A%22conda%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fconda-quickstart%22%7D%2C%7B%22label%22%3A%22Dart%22%2C%22slug%22%3A%22dart%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fdart-quickstart%22%7D%2C%7B%22label%22%3A%22PHP%20Composer%22%2C%22slug%22%3A%22php-composer%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fphp-composer-quickstart%22%7D%2C%7B%22label%22%3A%22Swift%22%2C%22slug%22%3A%22swift%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fswift-quickstart%22%7D%2C%7B%22label%22%3A%22Puppet%22%2C%22slug%22%3A%22puppet%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fpuppet-quickstart%22%7D%2C%7B%22label%22%3A%22Terraform%22%2C%22slug%22%3A%22terraform%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fterraform-quickstart%22%7D%2C%7B%22label%22%3A%22R%20(CRAN)%22%2C%22slug%22%3A%22r-cran%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Fr-cran-quickstart%22%7D%2C%7B%22label%22%3A%22RubyGems%22%2C%22slug%22%3A%22rubygems%22%2C%22path%22%3A%22artifact-registry%2Fnew-to-artifact-registry%2Fquickstart%2Frubygems-quickstart%22%7D%5D" selectedPlatform="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`.

{% hint style="info" %}
**FEATURE FLAG**

This feature is behind the feature flag `HAR_RAW_PACKAGE`. Contact [Harness Support](mailto:support@harness.io) to enable it.
{% endhint %}

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Access to a Harness account with appropriate permissions to create registries and connectors.

***

### Create a Raw File Artifact Registry <a href="#create-a-raw-file-artifact-registry" id="create-a-raw-file-artifact-registry"></a>

{% tabs %}
{% tab title="Interactive Guide" %}
{% embed url="<https://app.tango.us/app/embed/6c5d8a3b-6027-4707-b1ce-eb2229f928c3?defaultListView=false&hideAuthorAndDetails=true&makeViewOnly=false&skipBranding=false&skipCover=false>" %}
Create Harness Artifact Registry
{% endembed %}
{% endtab %}

{% tab title="Step-by-Step" %}

1. Navigate to the Artifact Registry module in your Harness project.
2. Click on **New Artifact Registry**.
3. In the Registry Type dropdown, select **Raw File registry** (or **Raw File**).
4. Provide a **Registry Name**.
5. Optionally, add a Description and Labels for better organization.
6. Choose visibility between **Public** and **Private**.
7. Click **Create Registry** to finalize.

{% hint style="info" %}
**REGISTRY NAME CRITERIA**

Your registry name must start with a letter and can include `lowercase alphanumerics`, `_`, `.` and `-`.
{% endhint %}
{% endtab %}
{% endtabs %}

***

### Configure an Upstream Proxy (Optional) <a href="#configure-an-upstream-proxy-optional" id="configure-an-upstream-proxy-optional"></a>

An upstream proxy allows your registry to fetch artifacts from external sources if they are not available locally.

{% tabs %}
{% tab title="Interactive Guides" %}

#### Create an upstream proxy

{% embed url="<https://app.tango.us/app/embed/ac44a833-12c5-4619-855a-f6d888bd3438?defaultListView=false&hideAuthorAndDetails=true&makeViewOnly=false&skipBranding=false&skipCover=false>" %}
Create sd1 Harness Upstream Proxy
{% endembed %}

#### Configure the upstream proxy in your registry

{% embed url="<https://app.tango.us/app/embed/198dac9f-b1fa-42c1-89dc-97f4aaba5fd3?defaultListView=false&hideAuthorAndDetails=true&makeViewOnly=false&skipBranding=false&skipCover=false>" %}
Configure genrawexternal Upstream in Harness
{% endembed %}
{% endtab %}

{% tab title="Step-by-Step" %}

#### Create an upstream proxy

1. In the Artifact Registry module, click the dropdown next to **New Artifact Registry** and select **Upstream Proxy**.
2. Choose **Raw File registry** (or **Raw File**) as the proxy type.
3. Click **Create Proxy** to establish the connection.

For remote URL, authentication, and other options, go to [Create an upstream proxy](/artifact-registry/use-artifact-registry/manage-registries/upstream-proxy.md).

#### Configure the upstream proxy in your registry

1. In the Artifact Registry module, select an existing **Raw File Artifact Registry**.
2. Select the **Configuration** tab.
3. Under **Advanced (Optional)**, select **Configure Upstream**.
4. Select from the list of compatible proxies to add them to your registry.
5. Click **Save** to save the configuration.
   {% endtab %}
   {% endtabs %}

***

### Raw File Client Setup <a href="#raw-file-client-setup" id="raw-file-client-setup"></a>

Follow these instructions to upload, download, and manage files in your Raw File registry using curl commands.

#### Generate Identity Token <a href="#generate-identity-token" id="generate-identity-token"></a>

An identity token will serve as the password for uploading and downloading artifacts.

1. Navigate to your Harness project.
2. Go to **Artifact Registry** and select your Raw File registry.
3. Click on **Setup Client** or **Authentication**.
4. Generate an identity token (API key) that you'll use in the commands below.

#### File Operations <a href="#file-operations" id="file-operations"></a>

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 example `config/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:

```bash
curl -XPUT 'https://pkg.harness.io/pkg/<ACCOUNT_ID>/<REGISTRY_NAME>/files/<FILE_PATH>' \
--header 'x-api-key: <API_KEY>' -T '<LOCAL_FILE_PATH>'
```

**Download a file from a specific path**

Use this curl command to download a file:

```bash
curl --location 'https://pkg.harness.io/pkg/<ACCOUNT_ID>/<REGISTRY_NAME>/files/<FILE_PATH>' \
--header 'x-api-key: <API_KEY>' -J -O
```

**Get file metadata**

Retrieve file metadata using a HEAD request:

```bash
curl --location --head 'https://pkg.harness.io/pkg/<ACCOUNT_ID>/<REGISTRY_NAME>/files/<FILE_PATH>' \
--header 'x-api-key: <API_KEY>'
```

**Delete a file**

Delete a file from a specific path in the registry:

```bash
curl --location --request DELETE 'https://pkg.harness.io/pkg/<ACCOUNT_ID>/<REGISTRY_NAME>/files/<FILE_PATH>' \
--header 'x-api-key: <API_KEY>'
```

{% hint style="info" %}
**NESTED VS FLAT PATHS**

File operations support both nested paths (for example, `config/prod/settings.json`) and flat paths (for example, `settings.json`), giving you flexibility in how you organize your files.
{% endhint %}

{% hint style="info" %}
**URL ENCODING AND HOSTNAMES**

Use the exact URL pattern shown in **Setup Client** for your registry if it differs from the examples (for example, cluster-specific hostnames). For paths that contain special characters, use the commands from **Setup Client** or URL-encode path segments as needed.
{% endhint %}

To complete the in-product flow, click **Done** in **Setup Client**.
