8

So in order to use NuGet and other dev tools working inside my organisation we've had to set a system wide environment variable 'http_proxy' for each user in our user specific Environment variables.

Now, this works for everything we've tried so far, all package managers like NuGet, NPM, chocolatey, all work fine with external repositories.

Recently we've tried to set up an internal NuGet server on our build server to internally host common packages. Everyone can browse to the URL where the server is located: -ip-/nuget and we can see the XML feed. The issue comes when we try to use nuget.exe, or Visual Studio 2017 for connecting to this source, the requests to find packages all time-out after 100000ms which i guess is the default timeout.

We can also browse exactly to the URL that times out out in any browser with no issue. I'm assuming that this is something to do with our internal proxy trying to route traffic out of the network when it is actually internal, but i have no way of verifying that.

Is there anything we can try to see if we can get this resolved?

4
  • Did you configure the proxy in nuget.config as described in learn.microsoft.com/en-us/nuget/schema/nuget-config-file? externals likely work because it uses https and not http for nuget.org Commented Sep 28, 2017 at 11:11
  • Initially we configured using nuget.config config setting, but we found we could replace this entirely with the environment variable and it still worked, i will try reverting this to see if it helps. Commented Sep 28, 2017 at 11:14
  • @MartinUllrich No luck unfortunately, i also tried switching the feed to https, and generating my own SSL key. It now takes less time to fail, and gives me a 503 Service unavailable error. Commented Sep 28, 2017 at 12:39
  • @LexWebb I have the same issue as you in 2017. I suppose that you have find a solution in the meantime, mind you share it here please ? Commented Jun 9, 2021 at 15:27

1 Answer 1

3

Is there anything we can try to see if we can get this resolved?

Since you can also browse exactly to the URL that times out out in any browser with no issue from your office system, there should be some internet limitations in your office environment. So I suggest you contact your office IT to confirm whether they add any limitations and whether used any proxy. If they are using some proxy, you need to set the proxy settings in NuGet.Config file which store in C:\Users\user name\AppData\Roaming\NuGet:

<configuration> <config> <add key="http_proxy" value="http://my.proxy.address:port" /> <add key="http_proxy.user" value="mydomain\myUserName" /> <add key="http_proxy.password" value="base64encodedHopefullyEncryptedPassword" /> </config> </configuration> 

Refer to this link for details: NuGet Behind Proxy

Sign up to request clarification or add additional context in comments.

3 Comments

This is the thing, we've tried this, in order to fix external NuGet sources, e.g. the official NuGet source, and this allows us to download and browse packages, its now only the internal sources that don't work (our build server)..
I have this same exact problem, but no one else seems to have this issue in my office, and I'm not sure how to resolve it. I've checked this configuration, as well as Internet Options proxy settings, and TFS proxy setting.
Remember to restart Visual Studio after you have updated the file 😉

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.