作者主签名的时间戳发现了一个建链问题:UntrustedRoot:证书链中的自签名证书 [英] The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
问题描述
在我的 .NET Core 项目上构建 docker 时,我在所有 NuGet 上都收到以下错误:
While doing a docker build on my .NET Core project, I got the following error on all my NuGets:
80.19/app/GradingTool.Tests/GradingTool.Tests.csproj:错误 NU3028:来自https://api.nuget.org/v3/index.json"的包Microsoft.EntityFrameworkCore 5.0.0":作者主签名的时间戳发现链构建问题:UntrustedRoot:证书链中的自签名证书 [/app/GradingTool.sln]
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:错误 NU3037:来自https://api.nuget.org/v3/index.json"的包Microsoft.EntityFrameworkCore 5.0.0": 作者主签名有效期已过.[/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:错误 NU3028:来自https://api.nuget.org/v3/index.json"的包Microsoft.EntityFrameworkCore 5.0.0":存储库会签的时间戳发现链构建问题:UntrustedRoot:证书链中的自签名证书[/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]
我以前从未遇到过这个错误,有人可以帮我找出问题所在吗?
I never had this error before, Can someone help me figure out what the problem is?
Dockerfile:
Dockerfile:
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/*
WORKDIR /app
COPY --from=build-env /app/out .
ENV ASPNETCORE_URLS="http://+:4200"
ENV ASPNETCORE_ENVIRONMENT="Production"
ENV GOOGLE_APPLICATION_CREDENTIALS="Credentials/SchoolTools-e9f260bdf56e.json"
ENV VIRTUAL_HOST="eva.schooltools.lu,www.eva.schooltools.lu,schooltools.lu,www.schooltools.lu"
ENV LETSENCRYPT_HOST="eva.schooltools.lu,www.eva.schooltools.lu,schooltools.lu,www.schooltools.lu"
ENV LETSENCRYPT_EMAIL="wilson.silva@edutec.lu"
EXPOSE 4200
ENTRYPOINT ["dotnet", "GradingTool.dll"]
推荐答案
在Dockerfile文件中,我改自
In the Dockerfile file, I changed from
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim
到
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine
这对我有用!
这篇关于作者主签名的时间戳发现了一个建链问题:UntrustedRoot:证书链中的自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!