Today I found myself unable to restore NuGet packages on my machine. Doing so produces errors resembling:
Myproject.csproj : error NU3034: Package 'SomePackage 1.2.3' from source 'https://api.nuget.org/v3/index.json': This package is signed but not by a trusted signer.
How can I fix package restore?
Running nuget trusted-signers list
showed I had one trusted signer by the name of "NuGet Test Developer".
This was present in %appdata%\NuGet\NuGet.Config
under the <trustedSigners>
node.
Commenting out the entire <trustedSigners>
node allowed restore to complete successfully.
It may also be possible to use nuget trusted-signers Add -Name nuget.org
to explicitly trust packages from nuget.org, but in my case I don't believe I need the "NuGet Test Developer" signator.
It may also be possible to use nuget config -set signatureValidationMode=accept
to disable signature validation altogether.
I found this article useful for learning more about NuGet package signing.
If someone tried everything said by Drew Noakes, but still is getting error you can also try running command:
nuget trusted-signers sync -Name <name>
Which fixed this error for me.
Here is link to documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With