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

# RPM

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

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

* Ensure you have **RPM CLI** installed and configured on your local machine.
* Ensure you have access to a Harness account with the appropriate permissions to create registries and connectors.

***

### Create an RPM Artifact Registry <a href="#create-an-rpm-artifact-registry" id="create-an-rpm-artifact-registry"></a>

{% tabs %}
{% tab title="Interactive Guide" %}
{% embed url="<https://app.tango.us/app/embed/61c5aaba-25bc-446d-b87e-f6f344521022?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true>" %}
Create RPM Artifact Registry in Harness
{% 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 list, select **RPM Registry**.
4. Provide a Registry Name.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>REGISTRY NAME</strong></p><p>This registry name must start with a letter and can only contain lowercase alphanumerics, <code>_</code>, <code>.</code> and <code>-</code>, and <strong>must be unique to your Harness Account</strong>.</p></div>
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 RPM REGISTRY**

This registry will serve as your private RPM 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 RPM packages 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/d85bcc3d-1807-481f-8279-a6d687a2a08b?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true>" %}
Create RPM Upstream Proxy in Harness Artifact Registry
{% endembed %}

#### Configure the upstream proxy in your registry

{% embed url="<https://app.tango.us/app/embed/c41c6ad2-718e-4783-96ea-fc39b5794096?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true>" %}
Configure RPM Upstream Proxy 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 \*\*RPM Registry\*\* as the proxy type. 3. Enter an upstream proxy name. 4. Enter your remote registry URL. 5. Choose your Authentication method (\`Anonymous\` by default). 6. 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 an RPM package isn’t found in your Harness registry, the upstream proxy fetches it from an external registry like RPM, reducing duplication and improving package resolution.
{% endhint %}

***

### Setup Client <a href="#setup-client" id="setup-client"></a>

With your RPM registry created, you can now authenticate the RPM CLI with your Harness registry using **YUM** or **DNF**.

{% tabs %}
{% tab title="YUM" %}
{% embed url="<https://app.tango.us/app/embed/0e46913d-ab3f-4b74-95f2-7e6d1b977817?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true>" %}
Configure YUM Client Registry Setup in Harness Artifact Registry
{% endembed %}
{% endtab %}

{% tab title="DNF" %}
{% embed url="<https://app.tango.us/app/embed/2e282a05-50db-4e4e-9707-c4b01137299d?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true>" %}
Configure RPM registry in Harness Artifact Registry with DNF
{% endembed %}
{% endtab %}

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

* In your Harness RPM Artifact Registry, click **Setup Client**.

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

1. Click **Generate Token** to generate an identity token for authentication.

{% hint style="info" %}
**INSTALLATION AND UPLOAD**

Whether you use **YUM** or **DNF**, the process is similar
{% endhint %}

#### 2. Install an RPM package <a href="#id-2-install-an-rpm-package" id="id-2-install-an-rpm-package"></a>

1. Create or edit your `.repo` file:

```bash
sudo vi /etc/yum.repos.d/<rpm-registry-name>.repo
```

{% hint style="info" %}
**YUM DEFAULT**

YUM and DNF both default to the yum.repos.d directory.
{% endhint %}

2. Add `.repo` file content:

```yaml
[<rpm-registry-name>]
name=<rpm-registry-name>
baseurl=https://pkg.app.harness.io/pkg/<account-id>/<rpm-registry-name>/rpm
enabled=1
gpgcheck=0
username=<username>
password=<token-from-step-2>
```

3. Clear your YUM or DNF cache:

```bash
sudo <yum-or-dnf> clean all
```

4. Install the RPM package:

```bash
sudo <yum-or-dnf> install <artifact-name>
```

#### 3. Upload an RPM package <a href="#id-3-upload-an-rpm-package" id="id-3-upload-an-rpm-package"></a>

1. Run the following cURL command with your package file:

```bash
curl --location --request PUT 'https://pkg.app.harness.io/pkg/<account-id>/<rpm-registry-name>/rpm/' \
--form 'file=@"<FILE_PATH>"' \
--header 'x-api-key: <API_KEY>'
```

* Click **Done** to complete your client setup.
  {% endtab %}
  {% endtabs %}

***
