Hello,
I am trying to add repository within "Dev Test Lab" in Azure Portal. Configuration and policies > Repositories > Add>repository. I'am trying to connect to Azure Devops repo.
What permissions do I need to have to succesfuly add new repository with token?
I have created personal access token and then i was trying to use this token (manually typing) in Azure but i have only got error "General Error".
Another error that was generated is :
"{
"status": "Failed",
"error": {
"code": "IncorrectClientCredentialOrCollectionUri",
"message": "The URI and/or credentials could not be validated successfully. Please check the URL to ensure it is valid and that the personal access token (PAT) hasn't expired."
}
}"
I think that this problem is related to my persmissions at Azure DevOps. But i dont know what permissions do i need and how to check them.
In my deployment I'am using :
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"artifactRepoSecurityToken": {
"type": "securestring"
},
"artifactRepositoryDisplayName": {
"type": "string",
"defaultValue": "Repo Name"
},
"artifactRepoUri": {
"type": "string",
"defaultValue": "https://companyname.visualstudio.com/DepartmentName/_git/DevTestLabs"
},
"artifactRepoBranch": {
"type": "string",
"defaultValue": "master"
},
"artifactRepoFolder": {
"type": "string",
"defaultValue": "/Artifacts"
},
"ARMRepoFolder": {
"type": "string",
"defaultValue": "/ARMTemplates"
},
"artifactRepoType": {
"type": "string",
"defaultValue": "VsoGit",
"allowedValues": [
"VsoGit",
"GitHub"
]
}
},
"variables": {},
"resources": [
{
"apiVersion": "2018-10-15-preview",
"type": "Microsoft.DevTestLab/labs/artifactSources",
"name": "[concat(trim(resourceGroup().name), '/',parameters('artifactRepositoryDisplayName'))]",
"location": "[resourceGroup().location]",
"properties": {
"uri": "[parameters('artifactRepoUri')]",
"folderPath": "[parameters('artifactRepoFolder')]",
"armTemplateFolderPath": "[parameters('ARMRepoFolder')]",
"branchRef": "[parameters('artifactRepoBranch')]",
"displayName": "[parameters('artifactRepositoryDisplayName')]",
"securityToken": "[parameters('artifactRepoSecurityToken')]",
"sourceType": "[parameters('artifactRepoType')]",
"status": "Enabled"
}
}
],
"outputs": {
}
}
Any help much appreciated.