azure-cli 登录获取 "self signed certificate in certificate chain"

azure-cli login getting "self signed certificate in certificate chain"

我已经通过 npm install -g azure-cli 安装了 azure-cli,但是我得到 self signed certificate in certificate chain:

感谢任何提示。

根据这些错误报告,这个问题似乎与 npm 使用 system/network 宽代理拦截 SSL 流量有关。使用 https 代理更新 npm 配置,应该可以解决此问题。一些人报告说更新 npm 也修复了它。看看吧。

https://github.com/npm/npm/issues/7519

https://github.com/npm/npm/issues/6916

您可以使用 Microsoft Azure Explorer 工具的故障排除指南来解决同一问题 https://support.microsoft.com/en-us/help/4021389/storage-explorer-troubleshooting-guide

它帮助了我,只需要一个调整:openssl 命令应该检查与 management.azure.com 而不是 microsoft.com

的连接

因此,OpenSSL 控制台中的命令将是:

OpenSSL> s_client -showcerts -connect management.azure.com:443

我发现我公司 IT 部门在我的案例(主题 = 颁发者)中添加了一个自签名证书。将该证书导入 ASE 后(以便 ASE 可以信任该自行颁发的证书),问题就解决了。