Self-hosted GitLab Repo Integration in Azure Pipelines

Working on Cloud platforms is more challenging if you are using private repos.

I tried to find multiple blogs and support documents to resolve my issue but all in vain. Finally after so many tweaks and tricks able to complete it.

And it is very obvious to write a blog about it so others can also take help from this.

Lets move to integration setup steps instead of creating hype.

Step 1. We need to install GITLAB extension plugin.

Please use below link for extension installation -

Step 2. Self hosted agent required to access Self hosted GitLab Repo

Most important point is that agent should be deployed where it can connects to private network. It could be either in VM in Azure or in VM on-premise. Agent needs to have opened connection on port 443 to Internet.

Step 3. Configuring Self Hosted agent for Azure Pipeline execution.

Note: Agent should be deployed under Default Pool in Organisation Settings.

Organization >> Organization Settings >> Agents Pools >> Default

Once agent is ready it will show as online under Default Agents tab.

Step 4. Adding Capabilities to Agent

Click on agent name >> Capabilities >> Add user defined capabilities

  • Capabilities we have added are GIT for Checkout and Maven for Build.

Step 5. Use Other GIT option while creating pipeline.

Use HTTPS clone URL for GitLab project. Also enter User name and Password/Token to access Self Hosted GITLAB repo.

Now we are All Set to run our Azure Pipeline !!!

Lead Fullstack Software Developer @ Micron Semicon (Asia Pte Ltd) Singapore

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store