azure - Azure DevOps Pipelines 的 az 登录失败

标签 azure azure-devops azure-cli

从今天起,当尝试执行以下命令时,我们在 Azure Devops 上的所有构建管道都会失败:

az acr helm push ...

管道失败并出现以下错误:

错误:请运行“az login”来设置帐户。

我们使用托管 Ubuntu 1604 在 Microsoft 托管代理上运行。
检查 Ubuntu 镜像的最新提交显示,azure cli 工具已从 2.0.52 更新到 2.0.55

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

也许这个版本更新引入了这个问题。只是猜测。

有人可以帮忙吗?

最佳答案

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

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

关于azure - Azure DevOps Pipelines 的 az 登录失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54513537/

相关文章:

azure - 如何允许在 Azure 租户中公开登录我的应用程序注册?

azure - 不支持的HttpVerb : The resource doesn't support specified Http Verb. RequestId:fa9c21f3-0001-005a-1484-d83478000000

azure-devops - 如何在 Visual Studio Team Services 中添加或删除冲刺的看板列?

python - 获取附加到特定订阅中 VM 的 Azure 操作系统磁盘列表

azure - 如何将现有的 Azure 存储帐户连接到专用链接?

visual-studio - 如果在 vs2012 中的 Azure 角色文件夹上看到黄色三角形,如何获取错误消息?

azure - Powershell Send-MailMessage 在 Azure Pipeline 上无法进行身份验证

asp.net - VSTS 构建以空构建工件结束

powershell convertfrom-json 选择对象差异

Azure CLI 与 Powershell?