> 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-ai/use-harness-platform/connectors/code-repositories/code-repositories-connectors-overview.md).

# Overview

Overview of the code repository connectors Harness supports and where to set up each one.

Harness code repository connectors connect your Harness account to your Git SCM (Source Code Management) provider. Pipelines use these connectors to pull code and other important files, such as Helm charts, Kubernetes manifests, and Terraform scripts, from your Git repositories.

You add a code repository connector once, then reuse it across pipelines and other Harness resources in the same account, organization, or project. Harness supports platform-specific connectors for popular Git providers, such as GitHub, GitLab, Bitbucket, and Azure Repos, as well as a platform-agnostic Git connector for any provider that exposes a standard Git endpoint.

***

## What you will learn from this topic

* How to find the [setup steps](#available-connectors) for each code repository Harness supports.
* How to choose the right [account, org, or project scope](#connector-scopes) for a connector.

***

## Available connectors

For instructions on connecting to a specific code repository, see:

* [Add an Azure Repos connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-an-azure-repos-connector.md): Connect to repositories hosted in Azure Repos, Microsoft's Git-based version control service on Azure DevOps.
* [Add a Bitbucket connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-bitbucket-connector.md): Connect to repositories hosted in Bitbucket.
* [Add a Git connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-git-connector.md): Connect to any Git provider that exposes a standard Git endpoint, using a platform-agnostic connector.
* [Add a GitHub connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-github-connector.md): Connect to repositories hosted on GitHub, with support for authentication through a GitHub App.
* [Add a GitLab connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-gitlab-connector.md): Connect to repositories hosted on GitLab.com or a self-hosted GitLab instance.

***

## Connector scopes

You can add a code repository connector at the account, org, or project scope. Each connector page explains the steps at the project scope. The process is the same for org and account scope, starting from the corresponding **Connectors** page.

***

## Git provider account permissions

When you create a code repo connector, you provide credentials for authentication and authorization, such as a username and password, a personal access token, or another authentication method. The credentials let the connector take actions in your Git provider, such as cloning repositories or reading pull request information. The credentials you provide must have the permissions necessary for the actions the connector will perform.

The account or token you use must have the same permissions that an equivalent user account needs to perform the same actions. For example:

* If the connector needs to clone repositories, the credentials must allow reading and cloning repositories.
* If the connector needs to pull manifests from a repo, the credentials must have `read repo` (or equivalent) permissions in your Git provider.

{% hint style="info" %}
**Personal access token permissions**

When you create a personal access token, the account you use to create the token must have the required permissions or higher, such as repo admin. Some connectors require an account with higher permissions, such as an admin account. Go to the [connector setup instructions](#available-connectors) for the exact permissions required by your provider.
{% endhint %}

For permissions related to the Harness Git Experience, go to [Source Code Manager settings](/harness-ai/use-harness-platform/connectors/code-repositories/source-code-manager-settings.md).

***

## SSH key authentication

If a code repo connector uses SSH key authentication, the SSH key is stored as a [Harness SSH credential secret](/harness-ai/use-harness-platform/secrets/add-use-ssh-secrets.md). The SSH credential's **Username** must be `git`.

***

## Troubleshooting

You might encounter these issues with code repo connectors. Additional connector-specific issues are described on the dedicated pages for each connector.

<details>

<summary>Network connection times out when fetching large repos</summary>

Harness performs a `git clone` to fetch files. When fetching very large repositories, the network connection can time out. With fetch optimization enabled, Harness uses provider-specific APIs to improve performance when fetching very large repos.

Currently, the fetch optimization feature is behind the setting `Fetch files from Git using provider-specific APIs`, under the Continuous Deployment section.

If this setting is enabled, and your GitHub organization has SAML enabled, the token must be SAML-authorized to access the organization, even if the repository is public. Go to the GitHub documentation on [GitHub authentication with SAML single sign-on](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on) for more information.

</details>

<details>

<summary>Pipeline status updates are not sent to PRs</summary>

Harness uses the pipeline's codebase connector to send status updates to PRs in your Git provider. Check the pipeline's [codebase configuration](https://developer.harness.io/docs/continuous-integration/use-ci/codebase-configuration/create-and-configure-a-codebase/) to confirm that it has a default codebase configuration and that it is using the correct code repo connector.

</details>

<details>

<summary>Connection tests fail due to network restrictions</summary>

If your connector connection tests (preflight checks) fail due to network restrictions, split DNS configurations, proxy setups, or restrictive firewall policies, but you know the connector will work at runtime, you can configure Harness to skip the connection validation.

To skip connector preflight checks, you need both:

1. **Account-level feature flag enabled**: Contact [Harness Support](mailto:support@harness.io) to enable the `CI_IGNORE_TEST_CONNECTION` feature flag for your account.
2. **Connector YAML configuration**: Add `ignoreTestConnection: true` to your connector's YAML configuration.

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

For more information and an example configuration, go to [Create a connector using YAML](/harness-ai/use-harness-platform/connectors/create-a-connector-using-yaml.md#skip-connector-preflight-checks).

Use this feature carefully. Skipping connection tests means Harness does not validate whether the connector credentials are correct or if the remote service is accessible. Only use this when you are certain the connector will work at runtime despite failing preflight checks.

</details>

***

## Next steps

* [Add an Azure Repos connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-an-azure-repos-connector.md): Connect to repositories hosted in Azure Repos.
* [Add a Bitbucket connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-bitbucket-connector.md): Connect to repositories hosted in Bitbucket.
* [Add a Git connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-git-connector.md): Connect to any Git provider using the platform-agnostic connector.
* [Add a GitHub connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-github-connector.md): Connect to repositories hosted on GitHub.
* [Add a GitLab connector](/harness-ai/use-harness-platform/connectors/code-repositories/add-a-gitlab-connector.md): Connect to repositories hosted on GitLab.
