The repository primary signature validity period has expired

Leonard Kong 1 Reputation point
2022-10-04T15:10:29.737+00:00

I am getting this error in the Build and Deploy job phase of an Azure Static Web Apps CI/CD check-in. The first part of the error message is:

Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET  
Copyright (C) Microsoft Corporation. All rights reserved.  
  
  Determining projects to restore...  
/home/runner/work/PhotoViewer/PhotoViewer/UnoPhotoViewer/UnoPhotoViewer.Wasm/UnoPhotoViewer.Wasm.csproj : error NU3028: Package 'runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 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  
/home/runner/work/PhotoViewer/PhotoViewer/UnoPhotoViewer/UnoPhotoViewer.Wasm/UnoPhotoViewer.Wasm.csproj : error NU3037: Package 'runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired.  
/home/runner/work/PhotoViewer/PhotoViewer/UnoPhotoViewer/UnoPhotoViewer.Wasm/UnoPhotoViewer.Wasm.csproj : error NU3028: Package 'runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 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  
/home/runner/work/PhotoViewer/PhotoViewer/UnoPhotoViewer/UnoPhotoViewer.Wasm/UnoPhotoViewer.Wasm.csproj : error NU3037: Package 'runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired.  

It appears that all project nuget dependencies are throwing similar messages. My Nuget Package Manager has both Allow Nuget to download missing packages AND Automatic check for missing packages during build in Visual Studio Checked.

Does anyone know what is causing this and how to resolve?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
759 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-10-04T22:29:03.707+00:00

    Hi, @Leonard Kong .

    There have been cases in the past with similar issues with security updates to .NET SDK versions.
    Updating the SDK was the solution then.

    https://github.com/dotnet/core/issues/6595#issuecomment-905086918

    I can't say for sure since I don't have a full view of your project, but it's worth a try.