Open UriZafrir opened 3 days ago
Hi @UriZafrir, since you're using Azure Artifacts, can you try using the Azure Artifact Credential Provider? We have some documentation on enabling that scenario in .NET containers here: https://github.com/dotnet/dotnet-docker/blob/main/documentation/scenarios/nuget-credentials.md#using-the-azure-artifact-credential-provider. The document also includes some troubleshooting steps.
Hi thanks for the response. Using it I get exactly the same error:. What can be done?
NuGet Config files used:
/src/Common/nuget.config
Feeds used:
<url>feed/nuget/v3/index.json
Done executing task "RestoreTask" -- FAILED.
Done building target "Restore" in project ".Common.csproj" -- FAILED.
Done Building Project "/src/Common/Common.csproj" (Restore target(s)) -- FAILED.
Build FAILED.
"/src/.Common/.Common.csproj" (Restore target) (1) ->
(Restore target) ->
/src/.Common/.Common.csproj : error NU1301: Unable to load the service index for source <url>-feed/nuget/v3/index.json.
/src/.Common/.Common.csproj : error NU1301: The SSL connection could not be established, see inner exception.
/src/.Common/.Common.csproj : error NU1301: The remote certificate is invalid because of errors in the certificate chain: PartialChain
FROM <account>.dkr.ecr.il-central-1.amazonaws.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
RUN echo "Build configuration is set to $BUILD_CONFIGURATION"
RUN ls
WORKDIR /src
COPY ["Common/", "Common/"]
RUN cat Common/nuget.config
ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS="{\"endpointCredentials\": [{\"endpoint\":\"<url>-feed/nuget/v3/index.json\", \"username\":\"feed\", \"password\":\"xxxxxx\"}]}"
RUN dotnet restore --configfile Common/nuget.config "./Common/Common.csproj" --verbosity detailed
Describe the bug
in on prem Azure Devops, using azure artifacts, i try to run dotnet restore in a docker container. It results in the error below. When running on the linux hosting the container, it works.
The error:
I've tried supplying the credentials in two ways, one is using commands, the other using a nuget.config file. both fail:
dotnet nuget add source -name feed
dotnet nuget update source tekes-feed --valid-authentication-types basic --username "feed" --password xxxxx --store-password-in-clear-text
dotnet nuget list source
I would appreciate any assistance.
Which .NET image(s) are you using?
mcr.microsoft.com/dotnet/sdk:8.0
Steps to reproduce
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release
WORKDIR /src COPY ["Common/", "Common/"]
RUN dotnet nuget add source/nuget/v3/index.json --name tekes-feed
RUN dotnet nuget update source tekes-feed --valid-authentication-types basic --username "-feed" --password xxx --store-password-in-clear-text
RUN dotnet nuget list source
RUN dotnet restore "./Common/Common.csproj"
Other information
No response
Output of
docker version
Output of
docker info