> 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/harness-platform/use-harness-platform/connectors/artifact-repositories/add-a-nexus-connector.md).

# Add a Nexus connector

Documentation for the provisioning of Nexus Repository connectors.

You connect Harness to Nexus using a Harness Nexus connector. This connector allows you to pull artifacts stored in your Nexus repository, including Docker, Maven, npm, and NuGet formats, for use in Harness pipelines.

This topic shows you how to add a Nexus connector to Harness.

For details on settings and permissions, see [Nexus Connector Settings Reference](/harness-platform/use-harness-platform/connectors/artifact-repositories/add-a-nexus-connector/nexus-connector-settings-reference.md).

***

## What you will learn from this topic

* How to [add a Nexus connector](#add-a-nexus-connector) to a Harness project so you can pull artifacts in a pipeline.

***

## Add a Nexus connector

You can add a Nexus connector at the project, org, or account scope. This procedure covers the project scope, and the process is the same for org and account. You can also add a Nexus connector directly when configuring the artifact source in a service.

Follow the interactive guide below for a step-by-step walkthrough:

{% embed url="<https://app.arcade.software/share/0IYltHvvaF1jnCh4msCu>" %}
Add a Nexus connector in Harness
{% endembed %}

Perform the following steps to add a Nexus connector:

1. Open your Harness project.
2. In **Project Settings**, select **Connectors**.
3. Select **New Connector**, then select **Nexus**. The Nexus Repository settings appear.

### Overview

4. In **Name**, enter a name for this connector. Optionally, add a description and tags. Click **Continue**.

### Details

5. In **Nexus Repository URL**, enter the URL that you use to connect to your Nexus server. For example, `https://nexus3.dev.mycompany.io/repository/your-repo-name`.
6. Select a **Version**.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Supported repository formats by Nexus version</strong></p><p>For Nexus 2.x, Harness supports the Maven, npm, and NuGet repository formats. Go to Sonatype's <a href="https://help.sonatype.com/repomanager3/nexus-repository-administration/formats">Supported Formats</a> page for details.</p><p>For Nexus 3.x, Harness supports the Docker (3.0 and later), Maven, npm, and NuGet repository formats.</p></div>
7. In **Authentication**, select one of the following options:
   * **Username and Password**: Enter the **Username** for the account. For **Password**, create a new Harness Encrypted Text secret or use an existing one.
   * **Anonymous (no credentials required)**. Click **Continue**.

### Delegates Setup

8. In **Delegates Setup**, use any delegate or enter [tags](/harness-platform/use-harness-platform/delegates/delegate/manage-delegates/select-delegates-with-selectors.md) for the specific delegates that you want to allow to connect to this connector. Click **Save and Continue**.

### Test Connection

9. Click **Finish** after the test connection succeeds. The connector is listed in **Connectors**.

### Sample YAML

The following example shows a YAML for the Nexus connector created in this guide.

<details>

<summary>YAML - Nexus connector</summary>

```yaml
connector:
  name: your-nexus-connector        # Display name for the connector in Harness
  identifier: yournexusconnector    # Unique ID used in pipelines and API references
  description: ""                     # Optional: brief description of this connector
  accountIdentifier: youraccountidentifier  # Your Harness account ID
  type: Nexus
  spec:
    nexusServerUrl: yournexusserverurl  # Base URL of your Nexus server (e.g. https://nexus3.dev.mycompany.io/repository/your-repo-name)
    version: 3.x                      # Nexus version: 2.x (Maven, npm, NuGet) or 3.x (Docker, Maven, npm, NuGet)
    auth:
      type: UsernamePassword          # Authentication method: UsernamePassword or Anonymous
      spec:
        username: username            # Username for the Nexus account
        passwordRef: password         # Reference to a Harness Encrypted Text secret containing the Nexus password
    ignoreTestConnection: false       # Set to true to skip the connection test and save the connector anyway
```

</details>

***

## Next steps

* [Artifact repository connectors](/harness-platform/use-harness-platform/connectors/artifact-repositories/artifact-repositories-connectors-overview.md): learn about the other artifact repository connectors Harness supports.
* [Use delegate selectors](/harness-platform/use-harness-platform/delegates/delegate/manage-delegates/select-delegates-with-selectors.md): control which delegates can connect to this connector.
* [Add a secret manager](/harness-platform/troubleshooting-and-resources/tutorials/add-secrets-manager.md): store connector credentials in a secret manager.
