I want to create a pipeline using Azure REST API linked with my “GITLAB” (not github) repo –
Using URL – https://dev.azure.com/{organization}/{project}/_apis/pipelines?api-version=7.0
In Body –
{
"name": "Gitlab Pipeline",
"folder": null,
"configuration": {
"type": "yaml",
"path": "/azure-pipelines.yml",
"repository": {
"id": "---",
"type": "Git",
"name": "---",
"fullName": "---",
"url": "---",
"defaultBranch": "main",
"connection": {
"id": "----",
"name": "---",
"type": "Git"
}
}
}
}
Getting response as –
{
"$id": "1",
"innerException": null,
"message": "This API does not support creating pipelines with repositories of type Unknown.",
"typeName": "Microsoft.Azure.Pipelines.WebApi.UnsupportedRepositoryTypeException, Microsoft.Azure.Pipelines.WebApi",
"typeKey": "UnsupportedRepositoryTypeException",
"errorCode": 0,
"eventId": ---
}
What to do for this, instead of “type”: “Git” what can I write
1
I can reproduce the same error from my side.
According to your scripts, you are trying to create a YAML pipeline based on GitLab repository. Currently, Azure DevOps doesn’t support this. You can only create classic build pipelines for your GitLab repository.
I noticed a feature request Allow using yaml build pipelines with Gitlab repositories asking to support YAML pipeline for Gitlab. You can follow it and submit a vote to help increase its priority.