[英]Azure CLI pipeline task hanging on ADO
I've written a simple AzureCLI script which should update a variable group value for a project.我编写了一个简单的 AzureCLI 脚本,它应该更新项目的变量组值。 I've tested the script locally and this workds find so I know its an ADO issue, this script is:
我已经在本地测试了脚本,并且发现了这个脚本,所以我知道它是一个 ADO 问题,这个脚本是:
echo $Pat_key| az devops login
az devops configure -d organization=https://dev.azure.com/****/ project=***
az pipelines variable-group variable update --id 365 --name release.version --value **-Release-1.2.0
I've tried a few differnt flavours, either running in powershell or adding the PAT token manually or not at all and either get AzureCLI just hanging and not progressing the task.我尝试了几种不同的风格,要么在 powershell 中运行,要么手动添加 PAT 令牌,或者根本不添加,要么让 AzureCLI 挂起而不继续执行任务。 If I get an error message, this is what I get:
如果我收到一条错误消息,这就是我得到的:
ERROR: TF400813: The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.
Any help would be amazing.任何帮助都会很棒。 Thanks again!
再次感谢!
The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.
用户 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' 无权访问此资源。
The error shows that the user accessing the resources with anonymous access.该错误表明用户以匿名访问方式访问资源。
I hope you are logged in with az devops login
only once when running the pipeline.我希望您在运行管道时仅使用
az devops login
一次。 If not avoid multiple logins.如果不能避免多次登录。
echo $Pat_key| az devops login
Having the same issue since last couple of weeks:/ Locally this works, it doesn't work only via azure pipelines.自过去几周以来遇到同样的问题:/在本地这有效,它不仅通过 azure 管道有效。 So I can tell its not a permission issue nor I don't have to reset my PAT.
所以我可以说这不是权限问题,也不必重置我的 PAT。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.