使用发布配置文件服务连接执行时 Azure DevOps 发布管道失败

标签 azure azure-devops

我正在使用 Azure DevOps 发布管道将基于 Asp.Net Core 构建的 Web 应用程序部署到 Azure 应用服务。应用程序服务已启动并正在运行。

我通过服务连接使用发布配置文件选项创建了 Azure 资源管理器连接。

[ARM-发布配置文件服务连接][1]

后来我配置了发布管道并使用了 Azure 应用服务部署,其中我选择了发布配置文件连接。

[发布个人资料连接][2]

正如您在屏幕截图中看到的,我无法在下拉列表中选择已创建的应用服务名称,因此我手动输入应用服务名称并保存管道。

一旦发布管道在 CI 管道之后被触发,任务就会失败并出现异常凭据不能为空

有人可以帮助我理解我在哪里犯了错误吗? [1]:/image/uvuGN.png [2]:/image/gLyIl.png

最佳答案

I was not able to select the already created app service name in the dropdown so I manually entered the app service name and saved the pipeline, the task failed with exception credentials can not be null.

我可以在我这边重现这个问题。我认为这是因为 azure 应用服务部署任务使用服务连接中的服务主体来向 Azure 进行身份验证。

作为解决方法,我们可以选择使用通过“服务主体(自动)”创建的服务连接 选项而不是使用“发布配置文件”选项创​​建的服务连接。

enter image description here

enter image description here

关于使用发布配置文件服务连接执行时 Azure DevOps 发布管道失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66850969/

相关文章:

azure - 保留RegistryManager实例是一个好习惯吗?

c# - 如何指定API版本?

npm - 在 VSTS 中缓存 npm install 任务

c# - 发布到 Azure 的 Asp.Net 应用程序仅显示 "Your App Service app has been created"

azure - 通过 API 将测试结果链接到 Azure DevOps 中的版本

azure - 在Azure DevOps中如何使用REST API触发发布?

c# - 环境变量在配置提供程序中不可见

azure - 在 Azure 应用服务中查找最近的部署日期时间(历史记录)

azure - 使用通配符在 blob 中搜索文件名

azure - 在 azure 上扩展 SQL 数据库。数据可能丢失吗?