T
T
Today I learned
Search…
Nuget and Proxies
If you need to access the nuget.org from behind a corporate firewall that needs authentication, one might think you need a custom nuget.config file with your proxy server URL and user/password settings.
It appears that even up to nuget 4.1, this is still not the case, the proxy settings need to reside in the default nuget.config location which is at %APPDATA%\NuGet\NuGet.Config.
This is covered in details in this nuget bug.
So, if you want to get out through the proxy easily, configure your nuget with the following:
1
nuget.exe config -set http_proxy="http://proxy.server.com:8888"
2
nuget.exe config -set http_proxy.user=Username
3
nuget.exe config -set http_proxy.Password=Password
Copied!
Do not store these in a separate config file! Make sure they go to the default!
In other words, don't do this:
1
nuget.exe config -set http_proxy="http://proxy.server.com:8888" -ConfigFile=D:\nuget\nuget.config
Copied!
Then when you run your nuget restore, it should work
Last modified 2yr ago
Copy link