【问题标题】:Untrusted Root when using dotnet restore使用 dotnet restore 时不受信任的根
【发布时间】:2021-03-23 13:13:14
【问题描述】:

我在 Mx Linux 19.3_x64 (Debian 10) 上运行 Visual Studio Code 和 dotnet 5,当我尝试运行 dotnet restore 时出现以下错误:

错误:无法加载源的服务索引 https://api.nuget.org/v3/index.json。错误:远程证书 由于证书链中的错误而无效:UntrustedRoot

认为这可能与我尝试运行 dpkg-reconfigure ca-certificatesupdate-ca-certificates --fresh 的 ca-certificates 有关,我还尝试安装不稳定版本的 ca-certificates 并重新安装 dotnetcore 5,但我无法解决这个问题。有什么帮助吗?

提前谢谢你。

【问题讨论】:

    标签: linux .net-core


    【解决方案1】:

    这与this issue with certificates on Debian-based distributions 有关。根据那个链接,Debian 10.8 应该已经解决了这个问题。

    编辑添加:The Ubuntu ticket 有两个证书需要重新启用才能正常工作。我只是按照这些说明进行操作,现在我的可以工作了。

    【讨论】:

    • 我尝试使用版本 20200601~deb10u2 的 ca 证书,我重新配置并确保检查了证书,但我仍然遇到同样的问题。我还尝试使用来自不稳定存储库的 20210119 版本,但再次没有运气。只是为了确保我检查了 /etc/ca-certificates.conf 并且没有取消选择的证书。
    猜你喜欢
    • 2018-02-04
    • 2021-01-09
    • 1970-01-01
    • 2019-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多