使用azd部署项目时,为何无法登录中国区Azure账号?

摘要:问题描述 使用 Azure Developer CLI (azd) 部署Aspire应用到Azure China中, 在2025年10月10号运行却报错无法登录,报错##[error]Bash exited wit
问题描述 使用Azure Developer CLI (azd) 部署Aspire应用到Azure China中, 在2025年10月10号运行却报错无法登录,报错##[error]Bash exited with code '1'. 而在之前均能正常登录的。 详细错误信息: 2025-10-09T22:07:47.5065424Z ##[section]Starting: login to azd auth 2025-10-09T22:07:47.5071300Z ============================================================================== 2025-10-09T22:07:47.5071433Z Task : Command line 2025-10-09T22:07:47.5071518Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows 2025-10-09T22:07:47.5071637Z Version : 2.250.1 2025-10-09T22:07:47.5071704Z Author : Microsoft Corporation 2025-10-09T22:07:47.5071802Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line 2025-10-09T22:07:47.5071913Z ============================================================================== 2025-10-09T22:07:47.6636821Z Generating script. 2025-10-09T22:07:47.6637165Z ========================== Starting Command Output =========================== 2025-10-09T22:07:47.6638152Z [command]/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/xxx-x-x-xxxx.sh 2025-10-09T22:07:49.0741040Z 2025-10-09T22:07:49.0742412Z ERROR: ClientSecretCredential: unable to resolve an endpoint: ResolveEndpoints(): TenantDiscoveryResponse: issuer from OIDC discovery 'https://login.partner.microsoftonline.cn/<tenant id>/v2.0' does not match authority 'https://login.chinacloudapi.cn/<tenant id>/' or a known pattern 2025-10-09T22:07:49.0766912Z 2025-10-09T22:07:49.0831041Z ##[error]Bash exited with code '1'. 2025-10-09T22:07:49.0874244Z ##[section]Finishing: login to azd auth 如何来解决这个问题呢? 问题解答 在对比之前执行成功的脚本内容,脚本并没有变化,排除脚本的错误。
阅读全文