For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a connector using YAML

This topic explains how to add a connector using the YAML editor.

Harness Connectors integrate Harness with your cloud platforms, codebase and artifact repos, and collaboration and monitoring tools.

You can add Connectors using the Harness GUI or via YAML using the Harness YAML Builder.

This topic shows you how to add a Connector using the YAML Builder.

Step 1: Create Secrets or Keys

Typically, Connectors use passwords or SSH keys to authenticate with platforms, tools, etc.

In Harness, you create a Harness secret for the password or SSH key, and then reference that secret's ID when you create your Connector.

You can create a secret at the Project, Org, or account level. In this example, we'll use Projects.

In Resources for a Project, Org, or account, click Secrets.

Click Create via YAML Builder.

Use a snippet to create the secret.

Here's an example of a Harness inline text secret in YAML:

secret:  
  type: SecretText  
  name: docs-dockerhub-password  
  identifier: docsdockerhubpassword  
  orgIdentifier: Doc  
  tags: {}  
  spec:  
    secretManagerIdentifier: harnessSecretManager  
    valueType: Inline

The identifier value (in this example, docsdockerhubpassword) is what you'll reference when you add your Connector in YAML.

For steps on other types of secrets, see Secrets and Secret Management.

Step 2: Create the Connector

In Resources, click Connectors.

Click Create via YAML Builder.

Copy and paste the snippet for the Connector you want to create.

For example, here is the snippet for a Docker Hub Connector:

Replace the values for the name and identifier keys.

Replace any URL values.

Provide values for the credentials keys.

For any password/key labels, paste the secret/key's identifier value.

For example, using the identifier from the secret created earlier (docsdockerhubpassword), the Docker Hub Connector would now be:

Click Save. The Connector is added and can be select in Pipeline stages.

Optional: Skip connector preflight checks

By default, Harness performs a connection test (preflight check) when you create or update a connector to validate that the credentials are correct and the remote service is accessible. However, in some environments with network restrictions, split DNS, proxy configurations, or restrictive firewall policies, these connection tests may fail even though the connector will work properly at runtime.

If you need to skip connector preflight checks, you can add the ignoreTestConnection: true property to your connector's YAML configuration. This requires the CI_IGNORE_TEST_CONNECTION feature flag to be enabled for your account. Contact Harness Support to enable this feature flag.

When both the feature flag and the ignoreTestConnection property are enabled, connection tests will always return as "Successful" without performing actual connectivity validation.

Example with ignoreTestConnection enabled:

Last updated

Was this helpful?