无法通过AzureCLI任务触发Azure管道构建。
任务:
错误输出如下:
URI的后缀serviceendpoint/endpoints不正确。
ADO的开发人员,如果有任何想法,请帮忙解决!
提前感谢! Nilotpal
任务:
- task: AzureCLI@2
inputs:
azureSubscription: 'Free Trial(My subscription)'
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
az --version
echo "Running : az account show"
az account show
#export AZURE_DEVOPS_EXT_PAT='mypat'
$env:AZURE_DEVOPS_EXT_PAT='mypat'
az pipelines create --name newPipeline --org https://dev.azure.com/AbiNilOrg/ --project azure-devops-kubernetes-terraform --branch master
错误输出如下:
Running : az account show
{
"environmentName": "AzureCloud",
"homeTenantId": "***",
"id": "73c1af29-384c-4574-bd88-92d7bb392cfc",
"isDefault": true,
"managedByTenants": [],
"name": "Free Trial",
"state": "Enabled",
"tenantId": "***",
"user": {
"name": "***",
"type": "servicePrincipal"
}
}
WARNING: This command is in preview and under development. Reference and support
levels: https://aka.ms/CLI_refstatus
ERROR: The requested resource requires user authentication:
https://dev.azure.com/AbiNilOrg/azure-devops-kubernetes-
terraform/_apis/serviceendpoint/endpoints
##[error]Script failed with exit code: 1
我理解 Azure 无法形成正确的 URI 以命中 REST 端点。
ERROR: The requested resource requires user authentication:
https://dev.azure.com/AbiNilOrg/azure-devops-kubernetes-
terraform/_apis/serviceendpoint/endpoints
URI的后缀serviceendpoint/endpoints不正确。
ADO的开发人员,如果有任何想法,请帮忙解决!
提前感谢! Nilotpal