> 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/3.0/artifacts/download-an-artifact.md).

# Download an artifact

Download an artifact from the UI at the package, version, or individual file level, or pull it with the hc CLI or the registry's native client.

Harness Artifacts supports three levels of download, and a CLI path for scripted or automated use.

## Before you begin

Your role must include the **Download (pull)** permission on the registry; the built-in **Viewer** role has it by default. Go to [RBAC: roles, permissions, and scopes](https://developer.harness.io/artifact-registry/3.0/reference/rbac-and-permissions.md) to review permission requirements.

## Download from the UI

1. Navigate to the artifact or version you want to download. You can reach it from the global **Artifacts** list, a registry's **Packages** tab, or the version details page.
2. Click **Show more actions** (**⋮**).
3. Select **Download**.

Harness prepares the download and shows a status indicator at the bottom center of the page. When preparation finishes, a green checkmark appears with a **Download** button to save the archive locally.

{% hint style="warning" %}
Do not navigate away from the page or close the browser while the download is being prepared; this interrupts the process.
{% endhint %}

### Download levels

* **Package level**: downloads all versions of an artifact as a single archive.
* **Version level**: downloads one version as an archive.
* **Individual files**: in the **Artifact Details** tab, click any file to download it directly. No preparation step is needed.

Download is available for every supported artifact type, including Docker and OCI images, Maven, npm, PyPI, and Generic.

### Download link expiry

Once ready, a package- or version-level download stays available for **24 hours**, or until you close the notification, whichever comes first. After that, repeat the download steps to prepare a new archive.

## Download with the CLI

To pull an artifact to your local machine from a script or pipeline, use `hc artifact pull`:

```bash
hc artifact pull <package-type> [args] [flags]
```

For the full command reference and examples, go to [CLI reference](https://developer.harness.io/artifact-registry/3.0/reference/cli.md#hc-artifact-pull).

## Download with the API

There is no dedicated download endpoint: pull an artifact programmatically using the registry's native client protocol for its format (for example, `docker pull`, `pip download`, or an authenticated `curl`/`wget` request for Generic and Raw). Go to [REST API](https://developer.harness.io/artifact-registry/3.0/reference/rest-api.md) for authentication details and the full endpoint reference.

## Troubleshooting

<details>

<summary>curl or wget download from a public registry fails with 401 or prompts for an API key</summary>

Public registries do not require the `x-api-key` header on downloads. Remove the `--header 'x-api-key: <API_KEY>'` line from your `curl` or `wget` command; it is only required for virtual or private registries. The copy-to-clipboard command shown in the UI file view is generated for the authenticated path, so trim the header when downloading from a public registry.

</details>

<details>

<summary>The Download option does not appear in the menu</summary>

Your role may not include the **Download (pull)** permission. Contact your account administrator to review your role assignments. Go to [RBAC: roles, permissions, and scopes](https://developer.harness.io/artifact-registry/3.0/reference/rbac-and-permissions.md) for the permission list.

</details>

<details>

<summary>Can I download a quarantined artifact?</summary>

No. Quarantine blocks pull and download for other users until it is removed. Go to [Quarantine](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/quarantine.md) for details.

</details>

## Next steps

* [Browse and search artifacts](https://developer.harness.io/artifact-registry/3.0/artifacts/browse-and-search.md)
* [Copy a version to another registry](https://developer.harness.io/artifact-registry/3.0/artifacts/copy-a-version.md)
* [Artifact version details](https://developer.harness.io/artifact-registry/3.0/artifacts/artifact-version-details.md)

{% @harness-feedback/feedback %}
