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

标签 azure azure-devops azure-container-registry

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

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

此问题与权限或其他问题有关吗?

最佳答案

您是否创建了 Service Principal Azure DevOps 管道?创建后,您可以根据您想要执行的操作赋予它适当的角色。

# 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

关于azure - 无法将 Azure-DevOps 与 Azure 容器注册表连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55832289/

相关文章:

Azure B2C - JWT 签名验证失败

使用 "extends"的 Azure yaml 管道

azure-devops - 由于 ubuntu 16.04 的棕色故障,Azure ADO 构建管道失败

Azure 容器注册表保留策略

sql-server - 允许将数据推送到 Azure SQL 数据库吗?

sql-server - 全文搜索速度慢 SQL V12 Azure

.net - 将角色分配给私有(private)应用程序中的客户端 key

c# - 获取Azure Servicebus队列错误 "The argument namespaceConnectionString is null or white space.\r\nParameter name: namespaceConnectionString"

azure - 私有(private) Azure 注册表中的 Windows 容器无法在 AKS 中启动

c# - 尝试发布到Azure容器注册表时获取 “Running the docker.exe login command failed.”