我试图使用Azure YAML管道将docker映像构建推送到Azure容器注册表。但是在推送时我遇到了类似的错误
"denied: requested access to the resource is denied
##[error]denied: requested access to the resource is denied
##[error]/usr/bin/docker failed with return code: 1"
下面是我为此使用的Azure yaml管道代码部分。还尝试通过删除includeSourceTags和AdditionalImageTags
variables:
BuildConfiguration: "Release"
AzureSubscription: "ea158397-eb3f-461a-94df-0eb6bbaada60"
AzureContainerRegistry: "microservicecontainerregistry01.azurecr.io"
KubernetesServiceEndpoint: "AKSServiceConnection"
ResourceGroup: "microservicedelivery"
- task: Docker@1
condition: eq(variables['fullCI'],True)
displayName: 'Push runtime image'
inputs:
azureSubscriptionEndpoint: ${{variables.AzureSubscription}}
azureContainerRegistry: ${{variables.AzureContainerRegistry}}
command: 'Push an image'
imageName: '$(imageName)'
includeSourceTags: false
additionalImageTags: $(Build.BuildId)
Microsoft托管计算机和私有计算机中都发生了相同的错误。