Cloud costs
April 29, 2024
min read

Migrating a GitLab Group to Harness Code Repository


Harness Code Repository provides developers with a familiar Git experience, packed with essential features. Harness Continuous Integration provides advanced intelligence features and build infrastructure, which can significantly reduce build and test times.

Combined with the unparalleled governance and security features of the Harness platform, Harness provides a compelling alternative to GitLab.

In this post, we will see how to import a GitLab group into the Harness Code Repository, then generate and execute a Harness Continuous Integration pipeline.

Here is a full walk-through of the steps covered.

Import Group from GitLab

In your GitLab profile, navigate to Access Tokens, then select Add new token. Give the token a name, choose the read_api scope, then select Create personal access token. Store the access token in a safe place.

In the Harness Code Repository, choose Import Repositories from the New Repository drop-down menu. Select GitLab from the Git Provider menu, enter your GitLab access token, then select Next step. Enter your group name in the Group field, then select Import Repositories.

All repositories in your GitLab group will be imported into your Harness project.

If you need to keep working in your GitLab repository, you can mirror changes between both repositories during your transition to Harness.

Create Harness CI Pipeline

Navigate to the Get Started workflow in your Harness CI project. You can choose from multiple infrastructure types, this guide will use Harness Cloud infrastructure. In the Select your Repository view, choose your desired repository from the list, then select Configure Pipeline.

By choosing Generate my Pipeline configuration, Harness CI can inspect the code in your repository and automatically generate your pipeline configuration. You can also choose Create empty Pipeline configuration.

Unlike other CI providers, Harness CI offers the flexibility of storing the pipeline YAML file in your repository, or within the Harness platform.

In the Configure Pipeline view, expand See Advanced Options, here you can select Store in Git. You can also customize the name and location of the pipeline YAML file.

Select Create Pipeline to continue.

Run Pipeline

Examine your pipeline configuration in the YAML editor view, or in the visual pipeline editor. Select the Run icon in the top-right corner, then select Run Pipeline and observe your pipeline execution.

Harness Cache Intelligence will be enabled if your language is supported, and you chose Generate my Pipeline configuration when creating the pipeline. Cache Intelligence takes the “guesswork” out of caching your build dependencies, ensuring dependencies are only downloaded and rebuilt when necessary.

In just a few steps, we were able to import our GitLab group into Harness and execute a pipeline!

Next Steps

Sign up now

Sign up for our free plan, start building and deploying with Harness, take your software delivery to the next level.

Get a demo

Sign up for a free 14 day trial and take your software development to the next level


Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

Case studies

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback?
Share your thoughts by creating a new topic in the Harness community forum.

Sign up for our monthly newsletter

Subscribe to our newsletter to receive the latest Harness content in your inbox every month.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Continuous Integration
Code Repository