NuGet Behind a Proxy
NuGet allows proxy settings configuration, enabling you to retrieve packages when behind a corporate firewall. While the feature has been available since 2011, command-line examples for proxy setup can be elusive.
To configure the proxy settings, utilize the following commands:
nuget.exe config -set http_proxy=http://my.proxy.address:port nuget.exe config -set http_proxy.user=mydomain\myUserName nuget.exe config -set http_proxy.password=mySuperSecretPassword
These commands will set the proxy address, username, and encrypted password in your NuGet.config file, which is located at "%appdata%NuGet."
Note: While omitting the http_proxy.password key may work for some users, it's crucial to update the stored password when changing your network login if your proxy credentials align with your network credentials.
The above is the detailed content of How Do I Configure NuGet to Work Behind a Proxy?. For more information, please follow other related articles on the PHP Chinese website!