NuGet behind a proxy
Hey I am in the process of releasing a .NET project as a Docker container.
How can I configure Nuget to use the proxy from the HTTP_PROXY & HTTPS_PROXY environment variables?
Currently it fails on restore as it can't resolve the feed.
Current Dockerfile:
5 Replies
NuGet CLI config command
Reference for the nuget.exe config command
It is
dotnet nuget
and not the NuGet.exe
, which is downloadable at nuget.org.
Second is iirc only available on windowsAh, fair, it does appear you can generate a configuration (
dotnet new nugetconfig
) that you could then provide the values in.Although it would appear that you should be able to get away with just the environment variable set correctly (as per https://github.com/NuGet/Home/issues/6978)
GitHub
Issues · NuGet/Home
Repo for NuGet Client issues. Contribute to NuGet/Home development by creating an account on GitHub.
as you see the env does not work 😄