简体   繁体   English

az 登录是否已在 Ubuntu 20.04 中停止工作?

[英]Has az login stopped working in Ubuntu 20.04?

I have used the azure command line some months back without problems.几个月前我使用 azure 命令行没有问题。 Today I needed to use it again.今天我需要再次使用它。 Nothing has changed in my system, and I am still using the same organization.我的系统没有任何变化,我仍在使用同一个组织。

I run az login from my terminal (Ubuntu 20.04) and I am shown a browser window. I login to my Azure account.我从我的终端 (Ubuntu 20.04) 运行az login ,我看到一个浏览器 window。我登录到我的 Azure 帐户。 The page replies with:该页面回复:

You have logged into Microsoft Azure, You can close this window. or we will redirect you to the Azure CLI documents in 10 seconds.您已登录 Microsoft Azure,您可以关闭此 window。或者我们将在 10 秒内将您重定向到 Azure CLI 文档。

The terminal then displays the authentication reply (a long json response).终端然后显示身份验证回复(长 json 响应)。 So far so good.到目前为止,一切都很好。

Now I try to do something with the azure cli, in this case trigger a pipeline:现在我尝试使用 azure cli 做一些事情,在这种情况下触发管道:

az pipelines run --output table --organization https://dev.azure.com/MyOrg/ --project MyProj --name MyRepo --branch refs/heads/y/branch --open

But it complains with:但它抱怨:

Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.在运行 Azure DevOps 命令之前,您需要运行登录命令(如果使用 AAD/MSA 身份则为 az login,如果使用 PAT 令牌则为 az devops login)以设置凭据。 Please see https://aka.ms/azure-devops-cli-auth for more information.有关详细信息,请参阅https://aka.ms/azure-devops-cli-auth

This was not the case some months back.几个月前情况并非如此。 What happened here?这里发生了什么?

EDIT编辑

This is my az cli:这是我的az cli:

» az --version
azure-cli                         2.34.1

core                              2.34.1
telemetry                          1.0.6

Extensions:
azure-devops                      0.18.0

Dependencies:
msal                              1.16.0
azure-mgmt-resource               20.0.0

Python location '/opt/az/bin/python3'
Extensions directory '/home/theuser/.azure/cliextensions'

Python (Linux) 3.8.12 (default, Mar  2 2022, 07:26:21) 
[GCC 9.3.0]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy

I have tried the same,to upgrade my CLI version and it failed several times and now only got succeed the error might be you are getting due to some recent changes still going on with 2.34.1 version .我试过同样的方法,升级我的CLI version ,它失败了几次,现在只成功了错误可能是由于2.34.1 version仍在进行的一些最近的更改。

在此处输入图像描述

在此处输入图像描述

Would suggest you use the old version of CLI and then check or, for Workaround you can use az devops login using PAT token .建议您使用旧版本的 CLI,然后检查,或者,对于解决方法,您可以使用az devops login using PAT token

You can refer the same document to login with PAT which one you are getting in an error.您可以参考相同的文档以login with PAT您遇到的错误。

For more information please refer this GitHub issue as suggested by @ wiruzman有关更多信息,请参阅@wiruzman 建议的 GitHub问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用az登录 - Can not login using az Cloud Run Run/Debug 已停止工作 - 已退出,代码为 127 - Cloud Run Run/Debug has stopped working - Exited with code 127 使用 Linux Ubuntu 20.04 在内部服务器上路由 - Routing on internal Server using Linux Ubuntu 20.04 googletrans 停止工作并出现错误“NoneType” object 没有属性“group” - googletrans stopped working with error 'NoneType' object has no attribute 'group' 如何在 Ubuntu 20.04 GCP 实例上安装 virtualenv? - how to install virtualenv on Ubuntu 20.04 GCP instance? terraform azurerm:错误:退出状态 1 - 需要 az 登录 - terraform azurerm : ERROR : exit status 1 - az login required 无法在 EC2 实例上安装 tensorflow Ubuntu 20.04 - failed to install tensorflow on a EC2 instance Ubuntu 20.04 在 ubuntu:20.04 上,运行 apt install python3-pip 失败了,有修复吗? - On ubuntu:20.04, running apt install python3-pip broke, is there a fix? 构建失败(Ubuntu 20.04 使用 ruby-build 20210119) - BUILD FAILED (Ubuntu 20.04 using ruby-build 20210119) 在最新(2020 年 8 月)firebase 更新后,使用 email 链接完成登录已停止为 flutter 工作 - After the latest (august 2020) firebase update , Complete sign in with the email link has stopped working for flutter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM