13

I am getting the following error in my NuGet Package Manager within VS 2015

[Nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json. The ServicePointManager does not support proxies with the https scheme.

This problem just started occurring a few days ago and it may have coincided with an update that I was forced to run but I cannot guarantee that and I do not know what the update contained. I don't even know that it was a VS update.

I see this error on the Browse and Updates page but not the Installed page. I have spent all day reading various Stack Overflow posts and the recommended solutions either did not work or were no longer applicable. Most solutions suggested adding a new Package Source without the https but none of the sources suggested are still valid.

I verified I am able to hit the https url from a browser and my colleague is able to use this package source also so I know the source is good.

I have run a repair on my Visusal Studio without resolving the problem and this issue replicates for a newly created empty project so I don't think it is problem with the .csproj file.

I have managed to download the NuGet CLI and limp along with that but I would much prefer to have the integrated functionality working.

Actionable suggestions are greatly appreciated.

4
  • ServicePointManager does not support proxies with the https scheme suggests your computer/user profile is configured to use a proxy for web requests. I don't know if new versions of .NET have fixed it, but the version of .NET that VS2015 is running as doesn't support connecting to the HTTP proxy using HTTPS. You need to reconfigure your proxy settings to talk to the proxy server over HTTP, and let the proxy talk to the rest of the internet over HTTPS. Commented Oct 24, 2018 at 21:44
  • Thanks for the lead. Can you give me a little more guidance as to where I look into this. I did see several comments about Proxies but I could not find any proxy definitions in my environment variables and I don't know where to look for this config. Commented Oct 25, 2018 at 11:16
  • If you're on Windows 10, press the start menu and type "proxy", the first search result should be "Change your proxy settings". If you're on an older version of Windows, it's somewhere in Internet Options (google it). Note that if you're on a work computer, you might have Group Policies setting it automatically. Commented Oct 25, 2018 at 20:32
  • Does this answer your question? Nuget connection attempt failed "Unable to load the service index for source" Commented Feb 11, 2020 at 17:30

4 Answers 4

17

Deleting the following directories fixed my problem:

  • %APPDATA%\NuGet
  • %LOCALAPPDATA%\NuGet

On Mac/Linux, delete this:

  • ~/.nuget

Note that this will also reset the list of package sources (at least on Linux), so you'll have to set that up again if you are using custom ones

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

3 Comments

this worked for me, I was unable to access the local nuget server
And on my Mac, deleting ~/.nuget fixed my problem. Thanks for the tip!
rd %APPDATA%\nuget /s /q rd %LOCALAPPDATA%\nuget /s /q
8

NuGet Package Manager unable to load the service index

You can try to use following ways to resolve this issue:

  • Check if you have any Windows HTTP proxy is specified, NuGet uses (if present) the HTTP Proxy specified in the environment variable http_proxy. Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it.
  • Check if you set something like this in your web.config file: proxyAddress="127.0.0.1:8888", if yes, remove it.
  • Delete these two nuget folders:%APPDATA%\NuGet & %LOCALAPPDATA%\NuGet, then restarted Visual Studio.

Check this thread and the similar post for some more details.

Hope this helps.

3 Comments

I tried all three suggestions above without any improvement. I did not have any proxy settings declared in my System Variables and I did not have the proxyAddress line in my web.config file. When my colleague gets in I am going to follow up on Ziv's suggestion above and see if there is some difference between their proxy settings from mine. So far I am still broken but thanks for the effort.
OK, I came back to this and managed to fix my problem. I believe there is a type above. I had to delete the proxyAddress="127.0.0.1:8888" from my machine.config file and not my web.config file. I believe Fiddler may have added that line. Once I deleted that entry as well as deleting the two nuget folders and restarted VS I was working again.
My issue was also with having a proxy entry in my machine.config. I also believe Fiddler put it there, but I don't know when (during install, or perhaps I ticked something in config). I had to remove the proxy entry and restart visual studio to get it working.
3

I had to restart my machine along with deleting the folder(s) like the main answer mentions

Folders to delete for Windows:

  • %APPDATA%\NuGet
  • %LOCALAPPDATA%\NuGet

Folder to delete for Mac:

  • ~/.nuget

Comments

1

A teammate of mine ran into a similar error when setting up a new developer environment.

We went through a lot of suggestions here and also what was listed at Nuget connection attempt failed "Unable to load the service index for source" - none of them worked.

We finally figured out their Gitlab username was wrong. Gitlab username's are case sensitive.

warning NU1900: Error occurred while getting package vulnerability data: The ServicePointManager does not support proxies with the https scheme.

As a debugging/checking measure, you might try curl to test things, as this doesn't use your username.

curl --header "PRIVATE-TOKEN: <token>" "https://gitlab.com/api/v4/groups/12345678/-/packages/nuget/...."

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.