azure-devopsgitlabmigrationdevopsmanifest

I can´t import repositories (Azure Devops) from manifest.xml file


I’m in the research phase to migrate all our Azure Devops repositories to GitLab, there are hundreds of repositories… According to the GitLab documentation, I can use the option of a manifest.xml file, the example structure is very basic, I tried, but I always get an error, with no details.

Where can I get or some one have one example a complete example of the mass import of repositories, making use of the manifest file? Repositories aren´t public, so, we will need authentication, how can i do this?

This is the structure of the manifest.xml file i tried.

<?xml version="1.0" encoding="UTF-8"?> <manifest><remote name="myorganization" fetch=".." review="https://myorganization.visualstudio.com/"/><default revision="main" remote="myorganization" sync-j="4"/><project path="AF.Deletion" name="myproject/_git/AF.Deletion" groups="testsroix" /></manifest>

GitLab correctly takes the url of the repository. For example: https://myorganization.visualstudio.com/myproject/_git/AF.Deletion

I have also tried to add authentication credentials to Azure Devops, with access token, git credentials, username and password.

Error listing the repositories in the manifest file.


Solution

  • Based on your description, I could reproduce the issue. This is because the import process failed in authentication to read from an Azure DevOps private repo and we should authenticate against Personal Access Token of our Azure DevOps accounts.

    Here is the correct manifest.xml which worked for me during the test.

    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
      <remote name="AzureDevOps" fetch=".." review="https://AlvinZhao:<xxPxxAxxTxx>@<YourAzureDevOpsOrgName>.visualstudio.com" />
      <default revision="main" remote="AzureDevOps" sync-j="4"/>
      <project path="GitLabProject1" name="TheProjectName/_git/ADORepo1" groups="Group-TestMigrationManifest"/>
    </manifest>
    

    enter image description here