artifacts-credprovider: Provider does not seem to work with latest SDK docker image

The readme is not very clear on what the prerequisites are for this on Linux – or, indeed, whether or not this even works with dotnet on Linux. I have a container based on microsoft/dotnet:2.1-sdk which contains version 2.1.402 of the SDK according to dotnet, I have run the install script and /root/.nuget/plugins contains the provider, but:

  • Setting VSS_NUGET_EXTERNAL_FEED_ENDPOINTS does not seem to have any effect (even with the correct syntax, as per #33)
  • Running dotnet restore --interactive project.csproj likewise fails with a 401 without ever prompting for anything.

There’s no evidence that the plugin is being run, so I’m guessing my prerequisites are somehow wrong.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

So, it turns out that the problem is this:

https://github.com/NuGet/Home/issues/7223

The workaround is to ensure that the container in question has a non-default locale (such as en_US.UTF-8) available and in use, after which the provider kicks into gear.

For the complete workaround, here the code to install a specific locale on a debian based image (like microsoft/dotnet-sdk) :

RUN apt-get update && apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8

It’s an Azure Artifacts feed, so I’d expect it to not be misconfigured, because there’s not that much to configure. 🙂