gpt4 book ai didi

azure - 无法选择在 azure devops 中使用托管标识来连接容器注册表

转载 作者:行者123 更新时间:2023-12-03 03:27:29 25 4
gpt4 key购买 nike

我想在 Azure DevOps 中的管道和容器注册表之间创建连接。管理员为我创建了托管身份。我想使用那个,但没有办法。

根据指南:https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/publish-to-acr?view=azure-devops&tabs=javascript%2Cportal%2Cmsi&fbclid=IwAR2bV28HzRs8v-qTXuo592KU5KxOFnNsOvhxpNx0ZCBYfz2OPnYXWh7rqUs

我应该能够创建与身份验证类型的连接:托管服务身份,如下面的屏幕所示: enter image description here

就我而言,没有办法,所以选择此选项。我只能在身份验证类型中选择服务主体:

enter image description here

这不是我想要的。这是为什么?是否与缺少某些权限有关?在最新的 azure devops 版本中是否可能禁止通过 azure 托管身份进行连接?如果您能得到答复,我将不胜感激。

最佳答案

我尝试在我的环境中重现您的场景并得到以下结果:-

当我尝试使用 docker 注册表创建服务连接时,即使我没有收到任何选择托管服务身份的选项,请参阅以下内容:-

enter image description here

我转到我的项目设置并尝试使用 Azure DevOps Managed Identity 创建服务连接,如下所示:-

enter image description here

或者:-
您可以通过选择 Azure 资源管理选项卡在 Azure DevOps 中单独创建托管服务身份,如下所示:-

enter image description here

  1. 为您的资源创建托管身份
  2. 将 Azure 角色分配设置为托管标识
  3. 为该托管身份创建服务连接,如上所示
  4. 将服务连接包含在管道中,如下所示:-
- task: AzureCLI@2

inputs:

azureSubscription: 'acr12325'

enter image description here

引用:-

Service connections in Azure Pipelines - Azure Pipelines | Microsoft Learn

关于azure - 无法选择在 azure devops 中使用托管标识来连接容器注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75384558/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com