nuget - 错误 NU3034:来自源“https://api.nuget.org/v3/index.json”的包“...”:此包已签名,但不是由受信任的签名者签名
问题描述
到今天为止,这个消息似乎无法解决。nuget.config 位于 C:\Users[user]\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.config 可以有不同的范围,我以为只有两个范围,计算机级别和 VS 2019(2017) 级别。不真实。 https://docs.microsoft.com/nl-nl/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses
我的解决方案中的 nuget.config 是错误的。删除后,包裹再次被接受。
推荐阅读
- google-apps-script - 编辑特定范围时如何运行函数
- regex - 正则表达式仅允许且仅允许数字
- java - 从文件中读取交替数据类型
- javascript - 添加到当前函数“总计”忽略某些值的逻辑
- javascript - GoogleJsonResponseException:对 drive.files.update 的 API 调用失败并出现错误:用户对此文件没有足够的权限
- javascript - p:calendar 在呈现第一个视图后触发 javascript 方法
- php - 批量更新不向数据库发送任何数组数据
- jquery - 在轮播 jQuery 中跟随按钮添加、删除类
- android - 错误:无法从“12”确定 java 版本
- excel - 如何在 SAP 中使用和循环 Excel 变量