> 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/conan-quickstart.md).

# Conan

{% @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="conan" %}

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

* Ensure you have the **Conan CLI** (`conan`) installed on your local machine.
* Access to a Harness account with appropriate permissions to create registries and connectors.

***

### Create a Conan artifact registry <a href="#create-a-conan-artifact-registry" id="create-a-conan-artifact-registry"></a>

{% tabs %}
{% tab title="Interactive Guide" %}
{% embed url="<https://app.tango.us/app/embed/8eb3e37c-e7fd-4029-9213-754ffa48513f>" %}
{% 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 **Conan Registry**.
4. Provide a **Registry Name**.

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

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

5. Optionally, add a Description and Labels for better organization.
6. Choose visibility between **Public** and **Private**.
7. Click **Create Registry** to finalize.
   {% endtab %}
   {% endtabs %}

{% hint style="info" %}
**PRIVATE REGISTRY**

This registry will serve as your private Conan registry within Harness.
{% endhint %}

***

### 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 Conan packages from external sources if they are not available locally.

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

#### Create an upstream proxy

{% embed url="<https://app.tango.us/app/embed/dba386ff-0e6c-4c3a-a754-2c45027ba552>" %}

***

#### Configure the upstream proxy in your registry

{% embed url="<https://app.tango.us/app/embed/10c56189-0e61-48a2-9b73-f9c9852bb284>" %}
{% 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 \*\*Conan Registry\*\* as the proxy type. 3. Click \*\*Create Proxy\*\* to establish the connection.

#### Configure the upstream proxy in your registry

1\. In the Artifact Registry module, select an existing 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 %}

{% hint style="info" %}
**UPSTREAM PROXY CACHING**

If a Conan package is not found in your Harness registry, the upstream proxy can fetch it from an external source like Conan Center, helping to reduce duplication and ensure reliable access to public packages.
{% endhint %}

***

### Navigate Conan packages in the UI <a href="#navigate-conan-packages-in-the-ui" id="navigate-conan-packages-in-the-ui"></a>

Conan packages use the **recipe reference** `name/version@user/channel` (for example `<ARTIFACT_NAME>/<VERSION>@<USER>/<CHANNEL>`). Drill down in this order:

1. **Registry → Packages:** open a package from the list.
2. **Versions:** each row is a **version** and **user/channel** pair. Expand a row to list **recipe revisions** (RREV), then open one to reach **Artifact Details**.
3. **Artifact Details:** use the header dropdowns to switch version, channel, or recipe revision.

#### Files vs Packages <a href="#files-vs-packages" id="files-vs-packages"></a>

Conan stores files and binaries for each recipe revision. Harness shows them on separate tabs in **Artifact Details**:

**Files (recipe revision):** The recipe and exported sources for `name/version@user/channel#rrev`. This tab answers "what is the recipe?"

* **`conanfile.py`:** the Conan recipe that defines build steps and dependencies.
* **`conan_sources.tgz`:** source files exported with the recipe.
* **`conanmanifest.txt`:** checksum manifest for the recipe files.

Copy MD5, SHA1, SHA256, or SHA512 checksums, or download individual recipe files from this tab.

**Packages (binary packages):** Prebuilt binaries for that recipe revision. This tab answers "which builds exist for this recipe?"

Each row is a **package ID**: one binary for a specific **settings** profile (OS, compiler, architecture, build type) and **options** (such as `shared` and `fPIC`). The **latest PREV** column shows the latest **package revision** for that binary.

| Tab          | Conan term                             | What you see                     |
| ------------ | -------------------------------------- | -------------------------------- |
| **Files**    | Recipe revision (RREV)                 | Recipe, sources, and manifest    |
| **Packages** | Package ID and package revision (PREV) | Built binaries per configuration |

Full binary reference format:

`<ARTIFACT_NAME>/<VERSION>@<USER>/<CHANNEL>#<RREV>:<PACKAGE_ID>#<PREV>`

**Readme** and **Dependencies** show readme content and the dependency graph for the selected recipe revision when available.

Go to [Artifact management](/artifact-registry/use-artifact-registry/manage-artifacts/artifact-management.md) to download at the package, version, or file level.

***

### Publish & Install Conan Packages <a href="#publish-and-install-conan-packages" id="publish-and-install-conan-packages"></a>

#### Configure authentication <a href="#configure-authentication" id="configure-authentication"></a>

An identity token serves as the password for the Conan remote.

1. In your Harness Conan Artifact Registry, click **Set Up Client** and generate an identity token.
2. Add the registry as a Conan remote:

```bash
conan remote add <REMOTE_NAME> https://pkg.harness.io/pkg/<ACCOUNT_ID>/<REGISTRY_NAME>/conan
```

3. Authenticate with your identity token:

```bash
conan remote login <REMOTE_NAME> <your-email@harness.io> -p <TOKEN>
```

#### Publish a package <a href="#publish-a-package" id="publish-a-package"></a>

Build the package locally:

```bash
conan create .
```

Upload it to the registry. Include the user and channel from your `conanfile.py`:

```bash
conan upload <ARTIFACT_NAME>/<VERSION>@<USER>/<CHANNEL> -r <REMOTE_NAME> --confirm
```

#### Install a package <a href="#install-a-package" id="install-a-package"></a>

Install a package from the registry:

```bash
conan install --requires=<ARTIFACT_NAME>/<VERSION>@<USER>/<CHANNEL> -r <REMOTE_NAME>
```

***
