The author primary signature’s timestamp found a chain building issue: UntrustedRoot: self-signed certificate in certificate chain

How To Solve The author’s primary signature’s timestamp found a chain building issue: UntrustedRoot: self-signed certificate in certificate chain error.

Here is I am Adding All Possible solutions that I have tried to Solve This Error. Without wasting your time, Let’s start this article.

How The author primary signature’s timestamp found a chain building issue: UntrustedRoot: self-signed certificate in certificate chain Error Occurs ?

I was Doing my docker build on a Dotnet Core project I face the following error:

 80.19 /app/GradingTool.Tests/GradingTool.Tests.csproj : error NU3028: Package 'Microsoft.EntityFrameworkCore 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/app/GradingTool.sln]

#12 80.20 /app/GradingTool.Tests/GradingTool.Tests.csproj : error NU3037: Package 'Microsoft.EntityFrameworkCore 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/app/GradingTool.sln]

#12 80.20 /app/GradingTool.Tests/GradingTool.Tests.csproj : error NU3028: Package 'Microsoft.EntityFrameworkCore 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/app/GradingTool.sln]

Here is My Docker File.

FROM mcr.microsoft.com/dotnet/sdk:latest AS build-env
WORKDIR /app
RUN apt-get update -yq \
    && apt-get install curl gnupg -yq \
    && curl -sL https://deb.nodesource.com/setup_10.x | bash \
    && apt-get install nodejs -yq
# Copy csproj and restore as distinct layers
COPY . ./
RUN dotnet restore
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:latest
RUN apt-get update \
    && apt-get install -y --no-install-recommends libgdiplus libc6-dev \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

here is I am Adding All Possible solutions that I have tried to Solve This Error.

How To Solve The author primary signature’s timestamp found a chain building issue: UntrustedRoot: self-signed certificate in certificate chain

How to solve The Primary Signatures timestamp found a chain building issue: UntrustedRoot: Self signed Certificate in certificate chain

I Think This Issue is related to Debian Image. Solution is to Switch to an ubuntu OR alpine based image instead.

Solution 1

I Think This Issue is related to Debian Image. Solution is to Switch to an ubuntu OR alpine based image instead.

FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS build-env

This Solution worked for me.

Solution 2

Just follow Below step to sort out this problem.

  1. In the Dockerfile file, Change Below line
  2. FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim
  3. and Replace with below line.
  4. FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine

Solution 3

  1. Downgrade to .NET Core 3.1
  2. If using docker, change your base image from “FROM mcr.microsoft.com/dotnet/sdk:5.0″ to ” FROM mcr.microsoft.com/dotnet/sdk:5.0-focal” or ” FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine”
  3. Put this inside the tag in your nuget.config to disable validation altogether (works with dotnet restore) :

<config> <add key=”signatureValidationMode” value=”accept” />

You can also check the status here: https://status.nuget.org/

Solution 4

  1. Replace mcr.microsoft.com/dotnet/sdk:latest
  2. With mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim-amd64.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Comment below your thoughts.

Also Read

1 thought on “The author primary signature’s timestamp found a chain building issue: UntrustedRoot: self-signed certificate in certificate chain”

Leave a Comment