Import a pipeline from Git
Topic describing how to import a Pipeline from Git to Harness.
Harness lets you create a Pipeline in the following ways:
Create an inline Pipeline and save its configuration in Harness.
Create a remote Pipeline and save its configuration in Git.
Import a Pipeline from Git and save its configuration in Git.
This topic explains how to import a Pipeline from your Git repo to Harness.
Before you begin
Permissions
Make sure you have Create/Edit permissions for Pipelines.
Import pipeline
You can import a Pipeline from the CI or CD module in Harness.
This topic shows you how to import a Pipeline to the CD module.
Select your project, then select Pipelines.
Select Import From Git.

The Import Pipeline From Git settings appear.

Enter a Name for your Pipeline.
If you are not using Harness Code Repository you will require a git connector. In Git Connector, select or create a Git Connector to connect to your Git repo. For steps, go to Code Repo Connectors.
Here's an example of a GitHub Connector that has the correct settings:

In Repository, select the repository from where you want to import the pipeline. If your repository isn't listed, enter its name since only a select few repositories are filled here.
In Git Branch, select the branch from where you want to import the pipeline. If your branch isn't listed, enter its name since only a select few branches are filled here.
Enter the YAML Path from where you want to import the pipeline. All your configurations are stored in Git in the Harness Folder.
Click Import. Click on your Pipeline to proceed. By default, Harness fetches your Pipeline details from the default branch. If you have imported Pipeline from some other branch you will see the below error.
Select the branch from where you imported the Pipeline and continue.
See also
Last updated
Was this helpful?

