Azure DevOps 无法部署到 Azure Web App
Azure DevOps unable to deploy to Azure Web App
我目前正在尝试将应用程序从 A 公司拥有的 Azure DevOps 下的发布管道部署到 B 公司拥有的 Azure 上托管的 Azure 应用程序。
尝试发布停止 Azure 应用程序时继续出现此错误:
Error: Failed to get resource ID for resource type
'Microsoft.Web/Sites' and resource name 'AppName'. Error: Could not
fetch access token for Managed Service Principal. Please configure
Managed Service Identity (MSI) for virtual machine
'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad
Request
我不知道如何解决这个问题。
目前已完成的工作:
- Web App是在B公司的Azure中创建的
- 来自 DevOps 公司 A 帐户的用户被添加为公司 Azure AD 中的来宾用户
- 用户在 Web 应用程序上拥有贡献者权限
- Web App
上的托管服务标识设置为 "On"
- 在 Azure DevOps 中设置发布时可以看到和选择公司 B 和 Web 应用程序的订阅。
我很确定还需要更多信息才能使发布部署正常工作,但经过深入搜索后,我找不到任何东西。
希望各位大神多多指教
设法找到我遇到的问题的解决方案。的
与Azure订阅来宾账户的访问权限有关。
首先"Managed Service Identity"与这个问题无关
这些是将公司 A 的 Azure DevOps 连接到公司 B 的 Azure 所遵循的步骤:
- 在公司 B Azure 中创建 Web 应用程序
- A 公司的 Azure DevOp 帐户已添加为 "Guest User"
在 B 公司的 Azure
- DevOp 的帐户在 Azure 和
订阅和 Web 应用程序。
- 在A公司的DevOps中,添加一个"Azure Resource Manager"。选择
公司 B 的 Azure 设置为 "Service Principal Authentication"
- 保存 Azure 资源管理器后,系统将提示您登录。
您需要使用 B 公司 Azure 的管理员帐户登录。
我遇到了这个问题,这是一个 MSI 问题,但没有按照 Internet 上其他地方的建议通过创建 VM 来解决。在我的例子中,我重置了应用程序服务的 MSI ID,这中断了 DevOps 中的服务连接(尽管 DevOps 没有告诉我这个 -_-)。
已通过在 DevOps 中删除并重新添加服务连接,并在发布管道设置中重新选择它来解决此问题。
我目前正在尝试将应用程序从 A 公司拥有的 Azure DevOps 下的发布管道部署到 B 公司拥有的 Azure 上托管的 Azure 应用程序。
尝试发布停止 Azure 应用程序时继续出现此错误:
Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'AppName'. Error: Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad Request
我不知道如何解决这个问题。
目前已完成的工作:
- Web App是在B公司的Azure中创建的
- 来自 DevOps 公司 A 帐户的用户被添加为公司 Azure AD 中的来宾用户
- 用户在 Web 应用程序上拥有贡献者权限
- Web App 上的托管服务标识设置为 "On"
- 在 Azure DevOps 中设置发布时可以看到和选择公司 B 和 Web 应用程序的订阅。
我很确定还需要更多信息才能使发布部署正常工作,但经过深入搜索后,我找不到任何东西。
希望各位大神多多指教
设法找到我遇到的问题的解决方案。的 与Azure订阅来宾账户的访问权限有关。
首先"Managed Service Identity"与这个问题无关
这些是将公司 A 的 Azure DevOps 连接到公司 B 的 Azure 所遵循的步骤:
- 在公司 B Azure 中创建 Web 应用程序
- A 公司的 Azure DevOp 帐户已添加为 "Guest User" 在 B 公司的 Azure
- DevOp 的帐户在 Azure 和 订阅和 Web 应用程序。
- 在A公司的DevOps中,添加一个"Azure Resource Manager"。选择 公司 B 的 Azure 设置为 "Service Principal Authentication"
- 保存 Azure 资源管理器后,系统将提示您登录。 您需要使用 B 公司 Azure 的管理员帐户登录。
我遇到了这个问题,这是一个 MSI 问题,但没有按照 Internet 上其他地方的建议通过创建 VM 来解决。在我的例子中,我重置了应用程序服务的 MSI ID,这中断了 DevOps 中的服务连接(尽管 DevOps 没有告诉我这个 -_-)。
已通过在 DevOps 中删除并重新添加服务连接,并在发布管道设置中重新选择它来解决此问题。