gpt4 book ai didi

docker - “dotnet restore”失败,出现“SSL peer certificate or SSH remote key was not OK”

转载 作者:行者123 更新时间:2023-12-02 19:37:13 29 4
gpt4 key购买 nike

我在Docker容器内进行dotnet还原时收到以下错误消息:

christian@debian:~/workspace$ docker build -t projectimage:v2 .
Sending build context to Docker daemon 4.336 MB
Step 1/9 : FROM microsoft/dotnet:1.1.1-sdk
---> 6aa7ef4f1f91
Step 2/9 : ADD https://adeartifactory/artifactory/tools/certificates/ca-bundle.crt /usr/local/share/ca-certificates/
Downloading 4.92 kB/4.92 kB
---> Using cache
---> 16d949cfeb21
Step 3/9 : RUN update-ca-certificates
---> Using cache
---> b86a8b2407e6
Step 4/9 : RUN mkdir /app
---> Using cache
---> c34785f331f0
Step 5/9 : COPY . /app
---> 93f3fd145ba2
Removing intermediate container 67f454eea5b7
Step 6/9 : WORKDIR /app
---> fe3cc459c87e
Removing intermediate container d0f14b824830
Step 7/9 : RUN dotnet restore . --source https://adeartifactory/artifactory/api/nuget/nuget-all
---> Running in 111d2a75d82d
Restoring packages for /app/Api.csproj...
Retrying 'FindPackagesByIdAsyncCore' for source 'https://adeartifactory/artifactory/api/nuget/nuget-all/FindPackagesById()?id='Microsoft.ApplicationInsights.AspNetCore''.
An error occurred while sending the request.
SSL peer certificate or SSH remote key was not OK
Retrying 'FindPackagesByIdAsyncCore' for source 'https://adeartifactory/artifactory/api/nuget/nuget-all/FindPackagesById()?id='Swashbuckle''.
An error occurred while sending the request.
SSL peer certificate or SSH remote key was not OK
Retrying 'FindPackagesByIdAsyncCore' for source 'https://adeartifactory/artifactory/api/nuget/nuget-all/FindPackagesById()?id='Microsoft.ApplicationInsights.AspNetCore''.
An error occurred while sending the request.
SSL peer certificate or SSH remote key was not OK
Retrying 'FindPackagesByIdAsyncCore' for source 'https://adeartifactory/artifactory/api/nuget/nuget-all/FindPackagesById()?id='Swashbuckle''.
An error occurred while sending the request.
SSL peer certificate or SSH remote key was not OK
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Failed to retrieve information about 'Microsoft.ApplicationInsights.AspNetCore' from remote source 'https://adeartifactory/artifactory/api/nuget/nuget-all/FindPackagesById()?id='Microsoft.ApplicationInsights.AspNetCore''. [/app/Api.sln]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : An error occurred while sending the request. [/app/Api.sln]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : SSL peer certificate or SSH remote key was not OK [/app/Api.sln]
The command '/bin/sh -c dotnet restore . --source https://adeartifactory/artifactory/api/nuget/nuget-all' returned a non-zero code: 1

Dockerfile:
FROM microsoft/dotnet:1.1.1-sdk

ADD https://adeartifactory/artifactory/tools/certificates/ca-bundle.crt /usr/local/share/ca-certificates/

RUN update-ca-certificates

RUN mkdir /app
COPY . /app

WORKDIR /app

RUN dotnet restore . --source https://adeartifactory/artifactory/api/nuget/nuget-all
RUN dotnet publish -c Release -o out

ENTRYPOINT ["dotnet", "out/Api.dll"]

这似乎是相同的,但不能解决问题:

"dotnet restore" fails with "SSL peer certificate or SSH remote key was not OK"

任何的想法?

问候,
基督教

最佳答案

我不再收到使用dotnet sdk的较新版本的错误消息。

FROM microsoft/dotnet:2.0.0-sdk

关于docker - “dotnet restore”失败,出现“SSL peer certificate or SSH remote key was not OK”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43759594/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com