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 ?
- How To Solve The author primary signature’s timestamp found a chain building issue: UntrustedRoot: self-signed certificate in certificate chain
- Solution 1
- Solution 2
- Solution 3
- Solution 4
- Summery
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
Question : How to solve The Primary Signatures timestamp found a chain building issue: UntrustedRoot: Self signed Certificate in certificate chain ?
Answer : 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.
- In the Dockerfile file, Change Below line
- FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim
- and Replace with below line.
- FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine
Solution 3
- Downgrade to .NET Core 3.1
- 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”
- 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
- Replace
mcr.microsoft.com/dotnet/sdk:latest
- 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.
Thank you so much! #1 helped me!