Neo*_*ron 8 yaml azure docker azure-pipelines acr
在 Azure DevOps 管道中将映像推送和拉取到 Azure 容器注册表任务失败。当尝试从本地系统拉取或推送时,没有问题,但当尝试使用 Azure Devops 管道执行此操作时,则会失败。Docker 登录成功,但当我想从 ACR 中提取镜像时失败,结果如下:
**Error response from daemon: Head "***/a2/abcd/manifest/latest": unauthorized: Invalid clientid or client secret.
##[error]Bash exited with code '1'.
##[debug]Processed: ##vso[task.issue type=error;]Bash exited with code '1'.
Run Code Online (Sandbox Code Playgroud)
我检查了 Az Devops 中的所有服务连接,它们看起来都配置正确。还检查了关联的服务主体是否具有AcrPull
权限AcrPush
,所有这些都已到位。只是不明白出了什么问题。
我的 Yaml 看起来像这样:
trigger: none
schedules:
- cron: "0 0 0 * *"
displayName: **** *
branches:
include:
- abcd
always: true
pool:
vmImage: 'ubuntu-latest'
variables:
- name: acrname
value: *****.azurecr.io
stages:
- stage: abcd
displayName: "pull images from acr"
jobs:
- job: abcdef
displayName: "abcdef"
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: '*****.azurecr.io'
- bash: |
docker pull $(acrname)/abc-def:latest
docker pull $(acrname)/igh-jkl:latest
name: pull
displayName: 'pull acr images'
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙吗?
iam*_*991 10
归档时间: |
|
查看次数: |
18520 次 |
最近记录: |