-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package Manager Error: Unable to load the service index for source (bad proxy settings) #2880
Comments
What version of NuGet are you using in VS? This is likely a bad proxy, or an older version of NuGet? |
NuGet package Manager v 3.4.4.1321 How can I find the fiddler trace? I'm fairly new to visual studio and such. |
Today I'm experimenting the same problem (in the past few days everything worked fine). If I run Fiddler I don't see any HTTP call but I got the error. What can I do? Thanks |
I finally ran Fiddler and saw the same. No HTTP but have the error |
Finally I found the issue, at least in my case: if no Windows HTTP proxy is specified, NuGet uses (if present) the HTTP Proxy specified in the environment variable http_proxy. |
Were you able to fix the issue? |
Yes, removing the env var http_proxy fixed the issue (in my case). |
Sorry i'm not too familiar with how to do that. How can i remove that env var? |
Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it. |
Incredible. It worked! Thanks big time. I've been stuck at this point for well over a month |
In mac os x shell I typed |
For me, a simple VS restart fixed the issue. |
In my computer I should go to catalog: And edit NuGet.xml file: Working file looks like this: |
|
For me removing the |
@vsg24 Thanks a ton! Removing .nuget from my profile (C:\Users<username>.nuget) worked like a charm! Environment: |
My issue was simple... my virtual machine lost internet connectivity! |
Can somebody help me with this issue? I am not using any kind of proxy and I have a brand new install of VS 2017 ..
|
Hi all, if you use Ubuntu server, this error fixed by install : https://www.howtoinstall.co/en/ubuntu/xenial/libcurl3 |
Would be nice if the error message could say "cannot reach 93.184.221.200" or similar (basically tell me which host or IP that couldn't be reached). Today our IDS had blocked nuget, because it believed the nuget host had performed a port scan on us. I doubt that is likely (far more likely that our frequent builds trigger lots of traffic to the nuget servers and this confused a poorly configured IDS). In any case..: A nicer error message would have sorted out our problem faster. |
Restarting VS works for me too. |
Had no environment variables mentioned here, was using new .Net IDE called Rider, on ubuntu, libcurl3 was already present. Ended up setting the IDE to use a proxy and then saved and then set to no proxy and saved. Thought it was a versioning issue as I'm using an old vs2015 project, but even changing the version used by project didn't help. Although it resolved a separate issue for me as mono supported .net >=4.5 and I had it targetting 4.5 but forgot I needed a nuget package thats linked to 4.6 :) |
Had the same issue today, removed .nuget folder from my profile folder and it started working again. The other things before (env var etc.) didn't work. |
Hi, i've the same problem.. I tryed to remove .nuget folder but it is still not working. In my environment variables i did not find any http_proxy var. I've this problem for days, please help me to solve it! :( |
I have the same problem. Can I manually download and install the package in my project? |
Go for Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off. This Works for me.... Try this ... |
I solved the problem! Thank you @VishalTank3010 |
@microsmith, thank you for the hint! In my case it was the firewall! |
I tried to remove the .nuget folder located in C:\Users\YourNameHere and the error continues, what can I do in that case?, I'm working in vs 2019 |
For me, open Fiddler 4 temporary fixed the problem but closing it causing error again. |
This trick solved the problem https://stackoverflow.com/a/58851687/3763113 |
This worked for me
|
Great! That worked for me! Thank you |
@vsg24 Thanks a ton! Removing .nuget from my profile (C:\Users<username>.nuget) worked like a charm! |
Just wanted to point out an additional tip. I have struggled as much as you guys, but the problem was that the docker image does not know my proxy server. It cannot resolve any dns entry, so I have added the HTTP_PROXY / HTTPS_PROXY to my dockerfile as arguments with the ip-address instead of the dns name.
|
Worked for me |
I have the same issue as you and I try all possible combination from internet bu my error is still active. and on > dotnet restore I get error: I don't know what more I can try, please any tips, help. |
You save my life bro. |
worked well with new ue5 early access on linux. |
I tried a lot of things you guys said but that just works when I restart the pc. I don't know if it's related but I was connected to a vpn just before the error started. Using vscode in Ubuntu with Dev Container |
Following this thread: NuGet/Home#2880
Would appreciate if anyone could help me: https://serverfault.com/q/1101866/563885 seems I have the same setup as @Lecarvalho (Ubuntu in Dev Container) but his fix appears to be "it magically started working again". I'm on a company laptop but not on a VPN. Possible my company has some sort of redirect that's messing up from within the container, but not sure how to figure that out. |
@RLashofRegas did you fixed it ? |
@AlFalahTaieb no, I was not able to fix it. I have resorted to using a GitHub Codespace as it doesn't have the same problem. |
Still doesnt work with VS2019/VS2022 |
I had the same problem after upgrading to vs2022 17.4.0 preview 2.1. It can be accessed in the browser, and the dotnet restore command is also normal, but accessing the Nuget package manager and restore in VS fails. |
What will be in case of Dockerfile for window image? |
I am getting the following error while running MVC .Net Framework application while building docker images by using Dockerfile. |
Same error occured all of a sudden an 30 minutes ago without any warning, nothing changed, in the middle of development! I tried VS2019 and it works for the same sln file |
one of the classic reason... Possible Problem: Stale Artifactory Credentials in Credential Manager Solution: Update/Remove Saved credentials from Credentials Manager When you rebuild from visual studio it will again ask for fresh credentials. It's upto you whether want to save or add every time. Credential manager - 1 Enter credentials after rebuild in VS 2 |
FOR WINDOWS MACHINES Try all of these and it something will fix it:
This SHOULD work, if it doesn't then the solutions that you will find by typing "error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json." into Google will work. |
facing Nuget problem, This issue i facing Only MAUI Project.(https://api.nuget.org/v3/index.json This URL Proper Work on browser ) |
Following error received when searching for packages in the package manager
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
Invalid URI: Invalid port specified.
The text was updated successfully, but these errors were encountered: