gitlabmirroring

List GitLab repositories that have mirroring enabled


We have repository mirroring to Azure set up on quite a few projects in our internal GitLab. I just discovered that generated credentials from Azure Git can be used to mirror other repositories too (not just the ones where the credentials were generated) if you have higher permissions. But I have already setup a lot of projects with different credentials and I would like to use just one pair of credentials and document where they were used. Problem is that now mirroring is set up on some projects and not set up on others.

Is there a way to display all the projects that have some kind of mirroring enabled so I don't have to go trough every single project and check manually?

We are running GitLab14.3.2-ee and I wasn't able to find anything like this in the Admin center


Solution

  • There isn't a way to easily display only repositories with mirroring enabled within the UI. However, you can access this information from the APIs. Calling the list-all-projects API returns a list of projects that you will need to paginate through. Each project has a mirror attribute that will be set to true or false, along with info about the mirror URL.