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 for each code repository Harness supports.
How to choose the right account, org, or project scope for a connector.
Available connectors
For instructions on connecting to a specific code repository, see:
Add an Azure Repos connector: Connect to repositories hosted in Azure Repos, Microsoft's Git-based version control service on Azure DevOps.
Add a Bitbucket connector: Connect to repositories hosted in Bitbucket.
Add a Git connector: Connect to any Git provider that exposes a standard Git endpoint, using a platform-agnostic connector.
Add a GitHub connector: Connect to repositories hosted on GitHub, with support for authentication through a GitHub App.
Add a GitLab connector: 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.
For permissions related to the Harness Git Experience, go to Source Code Manager settings.
SSH key authentication
If a code repo connector uses SSH key authentication, the SSH key is stored as a Harness SSH credential secret. 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.
Next steps
Add an Azure Repos connector: Connect to repositories hosted in Azure Repos.
Add a Bitbucket connector: Connect to repositories hosted in Bitbucket.
Add a Git connector: Connect to any Git provider using the platform-agnostic connector.
Add a GitHub connector: Connect to repositories hosted on GitHub.
Add a GitLab connector: Connect to repositories hosted on GitLab.
Last updated
Was this helpful?