小编vil*_*ekr的帖子

在 Azure DevOps Pipeline 中将 Docker Image 任务推送到 ACR 失败,并显示“未经授权:需要身份验证”

在 Azure DevOps 管道中推送和映像到 Azure 容器注册表任务失败。以前的任务执行得很好,即。docker 镜像创建成功,登录 ACR 成功。但是推送任务失败,结果如下:

unauthorized: authentication required
[error]unauthorized: authentication required
[error]/usr/bin/docker failed with return code: 1
[section]Finishing: Push Docker image
Run Code Online (Sandbox Code Playgroud)

docker push 到给定的 acr 可以从本地命令行正常工作。

# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- master

pool:
  vmImage: 'Ubuntu-16.04'

variables:
  imageName: 'renamed:$(build.buildId)'
  azureSubscriptionEndpoint: Renamed
  azureContainerRegistry: renamed.azurecr.io …
Run Code Online (Sandbox Code Playgroud)

azure-devops

4
推荐指数
4
解决办法
6449
查看次数

标签 统计

azure-devops ×1