-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet restore gives "The repository primary signature validity period has expired". #6595
Comments
@omajid posted this on the first issue:
|
The agent running the job is specified as Which should contain these sdks As the .csproj file shows, it's targeting
|
I cannot reproduce those errors using the 5.0.302 SDK (using docker) with the given project. Are you using that the signature validation nuget.config file you shared? That's not clear from what you wrote. /cc @aortiz-msft |
thank you for the answer @richlander. In one of the projects, we don't have a nuget.config file. In the other one it looks like (it's also failing from time to time):
Do you think adding the certificate's fingerprint to a nuget.config explicitly could solve the problem? Shouldn't not having a nuget.config yield the same behavior? |
For kicks, can you try moving to a later version of the SDK? 5.0.302 is now old. |
Another thing I noticed is that you are using a VS2017 image with .NET 5. .NET 5 is supported with VS2019+. You should also upgrade your image to VS 2019. That may be the bigger issue at play. |
I'm getting this error on CI on macOS specifically, since a few hours. There are two errors, in fact:
and
|
Your SDK is too old. I recommend jumping up to 5.0.400. This is happening on Linux, macOS, and Windows for a series of reasons. If you upgrade to the latest .NET 5 or .NET 6 SDK, it will likely resolved. I'll explain.
As a result of today's certificate changes on macOS, .NET 5.0.100 series SDKs are now unsupported (on macOS). |
This is tracked via NuGet/Home#11099. Note that this is Windows only and intermittent. |
@richlander thanks for the update and explanations, upgrading to 5.0.400 fixed it for me. |
As a follow up, I update our agents on Azure DevOps to use a newer SDK on win-2019 and it seems to have stabilized the issue. |
I'm talking to the team about adding logging to Azure DevOps and GH Actions to tell you that you are on an old SDK and should move. That may help in future. |
Absolutely. Thank you @richlander . I am going to close the issue. |
This save my life, thanks! |
This should fix "The repository primary signature validity period has expired" errors on macOS. See dotnet/core#6595
* Bump version of dotnet 5 SDK used in CI This should fix "The repository primary signature validity period has expired" errors on macOS. See dotnet/core#6595 * Bump further to 5.0.402 and 3.1.414
Which fails randomly on macOS/Unix, see dotnet/core#6595, example https://github.com/devlooped/isbn/runs/4694726319?check_suite_focus=true
Which fails randomly on macOS/Unix, see dotnet/core#6595, example https://github.com/devlooped/isbn/runs/4694726319?check_suite_focus=true
Which fails randomly on macOS/Unix, see dotnet/core#6595, example https://github.com/devlooped/isbn/runs/4694726319?check_suite_focus=true
Which fails randomly on macOS/Unix, see dotnet/core#6595, example https://github.com/devlooped/isbn/runs/4694726319?check_suite_focus=true
Which fails randomly on macOS/Unix, see dotnet/core#6595, example https://github.com/devlooped/isbn/runs/4694726319?check_suite_focus=true
Which fails randomly on macOS/Unix, see dotnet/core#6595, example https://github.com/devlooped/isbn/runs/4694726319?check_suite_focus=true This config file turns off the validation.
…ue with NuGet package validation which was preventing CI builds from succeeding: dotnet/core#6595 (comment)
…ue with NuGet package validation which was preventing CI builds from succeeding: dotnet/core#6595 (comment)
…ue with NuGet package validation which was preventing CI builds from succeeding: dotnet/core#6595 (comment)
This new version doesn't have the restore bug[1] we were hitting, per this comment[2]: ``` Jellyfin.Plugins.Telegram.csproj : error NU3028: Package 'System.Threading.Tasks.Extensions 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain ``` [1] dotnet/core#6595 [2] dotnet/core#6595 (comment)
This new version doesn't have the restore bug[1] we were hitting, per this comment[2]: ``` Jellyfin.Plugins.Telegram.csproj : error NU3028: Package 'System.Threading.Tasks.Extensions 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain ``` [1] dotnet/core#6595 [2] dotnet/core#6595 (comment)
This new version doesn't have the restore bug[1] we were hitting, per this comment[2]: ``` Jellyfin.Plugins.Telegram.csproj : error NU3028: Package 'System.Threading.Tasks.Extensions 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain ``` [1] dotnet/core#6595 [2] dotnet/core#6595 (comment)
Description
It's been almost 3 weeks that my CI/CDs fail intermittently when restoring the nuget packages. Here's one example
It fails trying to restore different packages. At one given moment it's Hangfire, the next run, is a different package. After a few times trying to rerun the same pipelines, it works.
Configuration
My .csproj / .sln files are very straightforward. I will paste an example .csproj from one of the projects failing here
I am using VSTS agents (Microsoft-hosted) via Azure DevOps, so I don't have control over the dotnet installation.
Regression?
Other information
I saw @chgill-MSFT talking about author signing certificates here but we are not enforcing
Thanks for the help !
The text was updated successfully, but these errors were encountered: