无法将Azure-DevOps与Azure容器注册表连接

问题描述 投票:1回答:1

我在DevOps Build Pipeline中创建了一个Build Docker Image任务。在此任务中,选择Azure订阅后,Azure容器注册表列表显示No results Found消息。

虽然我在该订阅中创建了ACR,但我无法通过DevOps Build Pipeline连接到它。

此问题是与权限还是其他相关的?

azure azure-devops azure-container-registry
1个回答
0
投票

您是否为Azure DevOps管道创建了Service Principal?一旦创建,您可以为您尝试做的事情赋予它适当的角色。

# Assign the desired role to the service principal. Modify the '--role' argument
# value as desired:
# acrpull:     pull only
# acrpush:     push and pull
# owner:       push, pull, and assign roles
az role assignment create --assignee $SERVICE_PRINCIPAL_ID --scope $ACR_REGISTRY_ID --role acrpull
© www.soinside.com 2019 - 2024. All rights reserved.