DEV Community

Martin Soderlund Ek
Martin Soderlund Ek

Posted on

2

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (1)

Collapse
 
ellajoni profile image
EllaJoni

Good information!! Photo vashikaran mantra

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay