通过Azure DevOps管道进行az登录失败 [英] az login fails wih Azure DevOps Pipelines

查看:197
本文介绍了通过Azure DevOps管道进行az登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自今天以来,当尝试执行follwoing命令时,我们在Azure Devops上的所有构建管道均失败:

Since Today all our build pipelines on Azure Devops fail, when trying to execute the follwoing command:

az acr helm push ...

管道失败,并显示以下错误:

The pipeline fails with following error:

ERROR: Please run 'az login' to setup account.

我们正在使用托管的Ubuntu 1604 在Microsoft托管的代理上运行.
检查Ubuntu映像的最新提交显示,已经将azure cli工具的版本从 2.0.52 更新到了 2.0.55 .

We are running on Microsoft hosted agents using Hosted Ubuntu 1604.
Checking the latest commits for the Ubuntu image shows, that there has been a version update from 2.0.52 to 2.0.55 of the azure cli tool.

https://github.com/Microsoft/azure-pipelines-image-generation/commit/56c54c965019c4f7456cd9af572a443df9d5d78c#diff-f87405c9dd43f633a04dd078666d61af

也许此版本更新引入了问题.只是猜测.

Maybe this version update introduced the problem. Just guessing.

任何人都可以帮忙吗?

Can anyone help please?

推荐答案

我将以下内容添加到我的管道中以将azure-cli版本降级,并且我的管道现在正在通过

I added the following to my pipeline to downgrade azure-cli a version, and my pipeline is now passing

- bash: sudo apt-get install -y --allow-downgrades azure-cli=2.0.54-1~xenial
  displayName: 'downgrade azure-cli'

这篇关于通过Azure DevOps管道进行az登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆