【问题标题】:error NU3034: Package '...' from source 'https://api.nuget.org/v3/index.json': This package is signed but not by a trusted signer错误 NU3034:来自源“https://api.nuget.org/v3/index.json”的包“...”:此包已签名,但不是由受信任的签名者签名
【发布时间】:2021-04-24 22:12:24
【问题描述】:

截至今天,这条消息似乎无法解决。 nuget.config 在 C:\Users[用户]\AppData\Roaming\NuGet\nuget.config

将 signatureValidationMode 设置为 accept 而不是 'required' 没有任何区别。 nuget 也不同步。

<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <trustedSigners>
    <author name="Microsoft2021">
        <certificate fingerprint="AA12DA22A49BCE7D5C1AE64CC1F3D892F150DA76140F210ABD2CBFFCA2C18A27" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
      </author>
      <repository  name="nuget.org" serviceIndex="https://api.nuget.org/v3/index.json">
       <certificate fingerprint="0e5f38f57dc1bcc806d8494f4f90fbcedd988b46760709cbeec6f4219aa6157d" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
       <certificate fingerprint="5a2901d6ada3d18260b9c6dfe2133c95d74b9eef6ae0e5dc334c8454d1477df4" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
      </repository>
  </trustedSigners>

</configuration>

现在所有的包都被认为是不可信的。你还有其他提示吗?谢谢!

错误 NU3034:来自源“https://api.nuget.org/v3/index.json”的包“Swashbuckle.AspNetCore.SwaggerGen 6.1.3”:此包已签名,但不是由受信任的签名者签名。

【问题讨论】:

    标签: nuget


    【解决方案1】:

    最后的答案很简单。 Nuget.config 可以有不同的范围,我以为只有两个范围,计算机级别和 VS 2019(2017) 级别。 不真实。 https://docs.microsoft.com/nl-nl/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses

    我的解决方案中的 nuget.config 错误。删除后,包裹再次被接受。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-23
      • 2012-04-02
      • 2015-11-02
      • 2012-04-23
      • 2021-12-09
      • 1970-01-01
      • 1970-01-01
      • 2019-02-02
      相关资源
      最近更新 更多