DEV Community

Martin Soderlund Ek
Martin Soderlund Ek

Posted on

Set Nuget Proxy

When performing a dotnet tool install or similar command, you get an error like this one:

Unable to load the service index for source https://api.nuget.org/v3/index.json.
The SSL connection could not be established, see inner exception.
Received an unexpected EOF or 0 bytes from the transport stream.
Enter fullscreen mode Exit fullscreen mode

You might then need to set proxy for Nuget.
Open Nuget.config in C:\users\YOUR_USER\AppData\Roaming\Nuget\Nuget.config

Add this config section to the configuration element:

<config>
  <add key="http_proxy" value="http://your-proxy-url:8080" />
  <add key="https_proxy" value="https://your-proxy-url:8080" />
</config>
Enter fullscreen mode Exit fullscreen mode

Your Nuget.config might then look like this:

<configuration>
  <packageSources>
    ...
  </packageSources>
  <config>
    <add key="http_proxy" value="http://your-proxy-url:8080" />
    <add key="https_proxy" value="https://your-proxy-url:8080" />
  </config>
</configuration>
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
ellajoni profile image
EllaJoni

Good information!! Photo vashikaran mantra