Nuget connection attempt failed “Unable to load the service index for source”












18















While trying to connect to Nuget, getting the error below and then I am unable to connect:




[nuget.org] Unable to load the service index for source
https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection
failed because connected host has failed to respond 68.232.34.200:443




I am able to access to https://api.nuget.org/v3/index.json on my browser.



It is not a duplicate. The other answers doesn't solve my problem.










share|improve this question

























  • Possible duplicate of VS2015 nuget package manager not finding packages

    – DaImTo
    Dec 16 '16 at 13:29











  • Since you have post the same issue on another thread (stackoverflow.com/questions/41157069/nuget-not-connecting), please continue this issue on your previous thread. And I also will follow this issue on your previous thread.

    – Weiwei Cai - MSFT
    Dec 19 '16 at 1:42











  • Do you have proxy configured on your machine? Or "http_proxy" variable configured in environment variable?

    – Eddie Chen - MSFT
    Dec 20 '16 at 2:54











  • Yes I have multiple proxies running on my machine. When I installed fiddler. I was able to access to nuget. I have corp proxy.

    – DarthVader
    Dec 20 '16 at 10:30











  • @DarthVader, if Eddie's reply help you resolve this issue, would you please mark it as the answer? Have a nice day:)

    – Jack Zhai-MSFT
    Dec 30 '16 at 3:49
















18















While trying to connect to Nuget, getting the error below and then I am unable to connect:




[nuget.org] Unable to load the service index for source
https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection
failed because connected host has failed to respond 68.232.34.200:443




I am able to access to https://api.nuget.org/v3/index.json on my browser.



It is not a duplicate. The other answers doesn't solve my problem.










share|improve this question

























  • Possible duplicate of VS2015 nuget package manager not finding packages

    – DaImTo
    Dec 16 '16 at 13:29











  • Since you have post the same issue on another thread (stackoverflow.com/questions/41157069/nuget-not-connecting), please continue this issue on your previous thread. And I also will follow this issue on your previous thread.

    – Weiwei Cai - MSFT
    Dec 19 '16 at 1:42











  • Do you have proxy configured on your machine? Or "http_proxy" variable configured in environment variable?

    – Eddie Chen - MSFT
    Dec 20 '16 at 2:54











  • Yes I have multiple proxies running on my machine. When I installed fiddler. I was able to access to nuget. I have corp proxy.

    – DarthVader
    Dec 20 '16 at 10:30











  • @DarthVader, if Eddie's reply help you resolve this issue, would you please mark it as the answer? Have a nice day:)

    – Jack Zhai-MSFT
    Dec 30 '16 at 3:49














18












18








18


2






While trying to connect to Nuget, getting the error below and then I am unable to connect:




[nuget.org] Unable to load the service index for source
https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection
failed because connected host has failed to respond 68.232.34.200:443




I am able to access to https://api.nuget.org/v3/index.json on my browser.



It is not a duplicate. The other answers doesn't solve my problem.










share|improve this question
















While trying to connect to Nuget, getting the error below and then I am unable to connect:




[nuget.org] Unable to load the service index for source
https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection
failed because connected host has failed to respond 68.232.34.200:443




I am able to access to https://api.nuget.org/v3/index.json on my browser.



It is not a duplicate. The other answers doesn't solve my problem.







c# .net visual-studio nuget






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 23 '18 at 16:53









Marcelo Machado

586520




586520










asked Dec 16 '16 at 13:24









DarthVaderDarthVader

22.8k58163264




22.8k58163264













  • Possible duplicate of VS2015 nuget package manager not finding packages

    – DaImTo
    Dec 16 '16 at 13:29











  • Since you have post the same issue on another thread (stackoverflow.com/questions/41157069/nuget-not-connecting), please continue this issue on your previous thread. And I also will follow this issue on your previous thread.

    – Weiwei Cai - MSFT
    Dec 19 '16 at 1:42











  • Do you have proxy configured on your machine? Or "http_proxy" variable configured in environment variable?

    – Eddie Chen - MSFT
    Dec 20 '16 at 2:54











  • Yes I have multiple proxies running on my machine. When I installed fiddler. I was able to access to nuget. I have corp proxy.

    – DarthVader
    Dec 20 '16 at 10:30











  • @DarthVader, if Eddie's reply help you resolve this issue, would you please mark it as the answer? Have a nice day:)

    – Jack Zhai-MSFT
    Dec 30 '16 at 3:49



















  • Possible duplicate of VS2015 nuget package manager not finding packages

    – DaImTo
    Dec 16 '16 at 13:29











  • Since you have post the same issue on another thread (stackoverflow.com/questions/41157069/nuget-not-connecting), please continue this issue on your previous thread. And I also will follow this issue on your previous thread.

    – Weiwei Cai - MSFT
    Dec 19 '16 at 1:42











  • Do you have proxy configured on your machine? Or "http_proxy" variable configured in environment variable?

    – Eddie Chen - MSFT
    Dec 20 '16 at 2:54











  • Yes I have multiple proxies running on my machine. When I installed fiddler. I was able to access to nuget. I have corp proxy.

    – DarthVader
    Dec 20 '16 at 10:30











  • @DarthVader, if Eddie's reply help you resolve this issue, would you please mark it as the answer? Have a nice day:)

    – Jack Zhai-MSFT
    Dec 30 '16 at 3:49

















Possible duplicate of VS2015 nuget package manager not finding packages

– DaImTo
Dec 16 '16 at 13:29





Possible duplicate of VS2015 nuget package manager not finding packages

– DaImTo
Dec 16 '16 at 13:29













Since you have post the same issue on another thread (stackoverflow.com/questions/41157069/nuget-not-connecting), please continue this issue on your previous thread. And I also will follow this issue on your previous thread.

– Weiwei Cai - MSFT
Dec 19 '16 at 1:42





Since you have post the same issue on another thread (stackoverflow.com/questions/41157069/nuget-not-connecting), please continue this issue on your previous thread. And I also will follow this issue on your previous thread.

– Weiwei Cai - MSFT
Dec 19 '16 at 1:42













Do you have proxy configured on your machine? Or "http_proxy" variable configured in environment variable?

– Eddie Chen - MSFT
Dec 20 '16 at 2:54





Do you have proxy configured on your machine? Or "http_proxy" variable configured in environment variable?

– Eddie Chen - MSFT
Dec 20 '16 at 2:54













Yes I have multiple proxies running on my machine. When I installed fiddler. I was able to access to nuget. I have corp proxy.

– DarthVader
Dec 20 '16 at 10:30





Yes I have multiple proxies running on my machine. When I installed fiddler. I was able to access to nuget. I have corp proxy.

– DarthVader
Dec 20 '16 at 10:30













@DarthVader, if Eddie's reply help you resolve this issue, would you please mark it as the answer? Have a nice day:)

– Jack Zhai-MSFT
Dec 30 '16 at 3:49





@DarthVader, if Eddie's reply help you resolve this issue, would you please mark it as the answer? Have a nice day:)

– Jack Zhai-MSFT
Dec 30 '16 at 3:49












11 Answers
11






active

oldest

votes


















9














You need to add proxy settings into Nuget.Config file. Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.






share|improve this answer
























  • For me it was that I had a http_proxy environment variable set up that was wrong.

    – Martin Brown
    Mar 13 '17 at 13:34






  • 1





    I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

    – Dan Csharpster
    Aug 8 '17 at 14:28






  • 1





    stuck with the same issue

    – Rıfat Erdem Sahin
    Jul 16 '18 at 16:01



















2














Go to



Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off.






share|improve this answer































    1














    The error can be caused by just temporary network issue, and disappear, if try again.






    share|improve this answer































      1














      In support of the answer provided by @Eddie Chen (here) I had to add http_proxy setting to following file as well:



      C:Windowssystem32configsystemprofileAppDataRoamingNuGetNuGet.Config



      <add key="http_proxy" value="http://your_proxy_url:8080" />





      share|improve this answer































        1














        Something may have change your proxy setting, like Fiddler. Close Fiddler, then close Visual Studio and open it again.






        share|improve this answer































          1














          I was getting this same error while running RUN dotnet restore in my Dockerfile using docker-compose up command in Windows 10.



          enter image description here



          I have tried all the possible solution provided on the internet and was also keep an eye on this open issue. Finally, after spending more than 8 hours, by following the preceding steps, I was able to fix my issue.




          1. Uninstall Docker from your system

          2. Restart your system


          3. Install Docker from this link. Below is the version of my Docker



            enter image description here



          4. Restart your system


          5. Start Docker for Windows, search Docker in the search bar in Windows. Make sure it is running.



          6. You should also go to Services.msc and make sure the services Docker Engine and Docker for Windows Service are running.



            enter image description here




          7. At last, you must check your Nuget.config file from C:UsersSibeeshAppDataRoamingNuGet. For me, the content of that file was as below.



            <?xml version="1.0" encoding="utf-8"?>
            <configuration>
            <packageSources>
            <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
            </packageSources>
            <packageRestore>
            <add key="enabled" value="True" />
            <add key="automatic" value="True" />
            </packageRestore>
            <bindingRedirects>
            <add key="skip" value="False" />
            </bindingRedirects>
            <packageManagement>
            <add key="format" value="0" />
            <add key="disabled" value="False" />
            </packageManagement>
            </configuration>



            Hope this helps.








          share|improve this answer

































            1














            I was getting the same error while trying to browse the NuGet Package, to resolve the same followed below step



            1- go to %appdata%NuGetNuGet.config



            2- Verify the urls mentioned in that config



            3- Remove the url which is not required



            4- Restart visual studio and check






            share|improve this answer

































              1














              I have stumbled across this issue when trying to run nuget.exe via Jenkins (configured as a service, by default using Local System account). I have edited C:WindowsSystem32configsystemprofileAppDataRoamingNuGetNuGet.Config file which looks like the following:



              <?xml version="1.0" encoding="utf-8"?>
              <configuration>
              <config>
              <add key="http_proxy" value="http://proxy_hostname_or_ip:3128" />
              <add key="https_proxy" value="http://proxy_hostname_or_ip:3128" />
              </config>

              <packageSources>
              <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
              </packageSources>

              </configuration>


              In order to test command prompt can be started via PSTools:



              psexec -i -s CMD


              and actual test run in the newly created cmd windows (runs as Local System):



              path_to_nugetnuget.exe restore "path_to_solutiontheSolution.sln"





              share|improve this answer

































                0














                Some development environment may not be using neither a browser nor a proxy.



                One solution would downloading the package from nugget such as the https://dotnet.myget.org/F/dotnet-core/api/v3/index.json to a shared directory then execute the following:



                dotnet add package Microsoft.AspNetCore.StaticFiles -s "shared drive:index.json"


                I hope that works for you.
                 






                share|improve this answer

































                  0














                  Go to -> Tools -> Extensions and Updates and uninstall NuGet package manager.. restart visual studio and reinstall it.... every thing will set to normal






                  share|improve this answer































                    0














                    In my case i had had Fiddler running which had changed my proxy settings






                    share|improve this answer























                      Your Answer






                      StackExchange.ifUsing("editor", function () {
                      StackExchange.using("externalEditor", function () {
                      StackExchange.using("snippets", function () {
                      StackExchange.snippets.init();
                      });
                      });
                      }, "code-snippets");

                      StackExchange.ready(function() {
                      var channelOptions = {
                      tags: "".split(" "),
                      id: "1"
                      };
                      initTagRenderer("".split(" "), "".split(" "), channelOptions);

                      StackExchange.using("externalEditor", function() {
                      // Have to fire editor after snippets, if snippets enabled
                      if (StackExchange.settings.snippets.snippetsEnabled) {
                      StackExchange.using("snippets", function() {
                      createEditor();
                      });
                      }
                      else {
                      createEditor();
                      }
                      });

                      function createEditor() {
                      StackExchange.prepareEditor({
                      heartbeatType: 'answer',
                      autoActivateHeartbeat: false,
                      convertImagesToLinks: true,
                      noModals: true,
                      showLowRepImageUploadWarning: true,
                      reputationToPostImages: 10,
                      bindNavPrevention: true,
                      postfix: "",
                      imageUploader: {
                      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                      allowUrls: true
                      },
                      onDemand: true,
                      discardSelector: ".discard-answer"
                      ,immediatelyShowMarkdownHelp:true
                      });


                      }
                      });














                      draft saved

                      draft discarded


















                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f41185443%2fnuget-connection-attempt-failed-unable-to-load-the-service-index-for-source%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown

























                      11 Answers
                      11






                      active

                      oldest

                      votes








                      11 Answers
                      11






                      active

                      oldest

                      votes









                      active

                      oldest

                      votes






                      active

                      oldest

                      votes









                      9














                      You need to add proxy settings into Nuget.Config file. Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.






                      share|improve this answer
























                      • For me it was that I had a http_proxy environment variable set up that was wrong.

                        – Martin Brown
                        Mar 13 '17 at 13:34






                      • 1





                        I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

                        – Dan Csharpster
                        Aug 8 '17 at 14:28






                      • 1





                        stuck with the same issue

                        – Rıfat Erdem Sahin
                        Jul 16 '18 at 16:01
















                      9














                      You need to add proxy settings into Nuget.Config file. Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.






                      share|improve this answer
























                      • For me it was that I had a http_proxy environment variable set up that was wrong.

                        – Martin Brown
                        Mar 13 '17 at 13:34






                      • 1





                        I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

                        – Dan Csharpster
                        Aug 8 '17 at 14:28






                      • 1





                        stuck with the same issue

                        – Rıfat Erdem Sahin
                        Jul 16 '18 at 16:01














                      9












                      9








                      9







                      You need to add proxy settings into Nuget.Config file. Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.






                      share|improve this answer













                      You need to add proxy settings into Nuget.Config file. Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Dec 21 '16 at 8:43









                      Eddie Chen - MSFTEddie Chen - MSFT

                      24.5k22346




                      24.5k22346













                      • For me it was that I had a http_proxy environment variable set up that was wrong.

                        – Martin Brown
                        Mar 13 '17 at 13:34






                      • 1





                        I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

                        – Dan Csharpster
                        Aug 8 '17 at 14:28






                      • 1





                        stuck with the same issue

                        – Rıfat Erdem Sahin
                        Jul 16 '18 at 16:01



















                      • For me it was that I had a http_proxy environment variable set up that was wrong.

                        – Martin Brown
                        Mar 13 '17 at 13:34






                      • 1





                        I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

                        – Dan Csharpster
                        Aug 8 '17 at 14:28






                      • 1





                        stuck with the same issue

                        – Rıfat Erdem Sahin
                        Jul 16 '18 at 16:01

















                      For me it was that I had a http_proxy environment variable set up that was wrong.

                      – Martin Brown
                      Mar 13 '17 at 13:34





                      For me it was that I had a http_proxy environment variable set up that was wrong.

                      – Martin Brown
                      Mar 13 '17 at 13:34




                      1




                      1





                      I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

                      – Dan Csharpster
                      Aug 8 '17 at 14:28





                      I had that problem too, and removed it in the command line, but now the problem is back but I have no proxy set currently. Any idea what could still be going wrong?

                      – Dan Csharpster
                      Aug 8 '17 at 14:28




                      1




                      1





                      stuck with the same issue

                      – Rıfat Erdem Sahin
                      Jul 16 '18 at 16:01





                      stuck with the same issue

                      – Rıfat Erdem Sahin
                      Jul 16 '18 at 16:01













                      2














                      Go to



                      Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off.






                      share|improve this answer




























                        2














                        Go to



                        Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off.






                        share|improve this answer


























                          2












                          2








                          2







                          Go to



                          Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off.






                          share|improve this answer













                          Go to



                          Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 30 '17 at 6:43









                          VISHAL TANKVISHAL TANK

                          4218




                          4218























                              1














                              The error can be caused by just temporary network issue, and disappear, if try again.






                              share|improve this answer




























                                1














                                The error can be caused by just temporary network issue, and disappear, if try again.






                                share|improve this answer


























                                  1












                                  1








                                  1







                                  The error can be caused by just temporary network issue, and disappear, if try again.






                                  share|improve this answer













                                  The error can be caused by just temporary network issue, and disappear, if try again.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Nov 16 '17 at 1:55









                                  Michael FreidgeimMichael Freidgeim

                                  13k688111




                                  13k688111























                                      1














                                      In support of the answer provided by @Eddie Chen (here) I had to add http_proxy setting to following file as well:



                                      C:Windowssystem32configsystemprofileAppDataRoamingNuGetNuGet.Config



                                      <add key="http_proxy" value="http://your_proxy_url:8080" />





                                      share|improve this answer




























                                        1














                                        In support of the answer provided by @Eddie Chen (here) I had to add http_proxy setting to following file as well:



                                        C:Windowssystem32configsystemprofileAppDataRoamingNuGetNuGet.Config



                                        <add key="http_proxy" value="http://your_proxy_url:8080" />





                                        share|improve this answer


























                                          1












                                          1








                                          1







                                          In support of the answer provided by @Eddie Chen (here) I had to add http_proxy setting to following file as well:



                                          C:Windowssystem32configsystemprofileAppDataRoamingNuGetNuGet.Config



                                          <add key="http_proxy" value="http://your_proxy_url:8080" />





                                          share|improve this answer













                                          In support of the answer provided by @Eddie Chen (here) I had to add http_proxy setting to following file as well:



                                          C:Windowssystem32configsystemprofileAppDataRoamingNuGetNuGet.Config



                                          <add key="http_proxy" value="http://your_proxy_url:8080" />






                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Nov 17 '17 at 2:43









                                          jitin14jitin14

                                          664




                                          664























                                              1














                                              Something may have change your proxy setting, like Fiddler. Close Fiddler, then close Visual Studio and open it again.






                                              share|improve this answer




























                                                1














                                                Something may have change your proxy setting, like Fiddler. Close Fiddler, then close Visual Studio and open it again.






                                                share|improve this answer


























                                                  1












                                                  1








                                                  1







                                                  Something may have change your proxy setting, like Fiddler. Close Fiddler, then close Visual Studio and open it again.






                                                  share|improve this answer













                                                  Something may have change your proxy setting, like Fiddler. Close Fiddler, then close Visual Studio and open it again.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Jun 1 '18 at 22:36









                                                  Sylvain RodrigueSylvain Rodrigue

                                                  3,21543753




                                                  3,21543753























                                                      1














                                                      I was getting this same error while running RUN dotnet restore in my Dockerfile using docker-compose up command in Windows 10.



                                                      enter image description here



                                                      I have tried all the possible solution provided on the internet and was also keep an eye on this open issue. Finally, after spending more than 8 hours, by following the preceding steps, I was able to fix my issue.




                                                      1. Uninstall Docker from your system

                                                      2. Restart your system


                                                      3. Install Docker from this link. Below is the version of my Docker



                                                        enter image description here



                                                      4. Restart your system


                                                      5. Start Docker for Windows, search Docker in the search bar in Windows. Make sure it is running.



                                                      6. You should also go to Services.msc and make sure the services Docker Engine and Docker for Windows Service are running.



                                                        enter image description here




                                                      7. At last, you must check your Nuget.config file from C:UsersSibeeshAppDataRoamingNuGet. For me, the content of that file was as below.



                                                        <?xml version="1.0" encoding="utf-8"?>
                                                        <configuration>
                                                        <packageSources>
                                                        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
                                                        </packageSources>
                                                        <packageRestore>
                                                        <add key="enabled" value="True" />
                                                        <add key="automatic" value="True" />
                                                        </packageRestore>
                                                        <bindingRedirects>
                                                        <add key="skip" value="False" />
                                                        </bindingRedirects>
                                                        <packageManagement>
                                                        <add key="format" value="0" />
                                                        <add key="disabled" value="False" />
                                                        </packageManagement>
                                                        </configuration>



                                                        Hope this helps.








                                                      share|improve this answer






























                                                        1














                                                        I was getting this same error while running RUN dotnet restore in my Dockerfile using docker-compose up command in Windows 10.



                                                        enter image description here



                                                        I have tried all the possible solution provided on the internet and was also keep an eye on this open issue. Finally, after spending more than 8 hours, by following the preceding steps, I was able to fix my issue.




                                                        1. Uninstall Docker from your system

                                                        2. Restart your system


                                                        3. Install Docker from this link. Below is the version of my Docker



                                                          enter image description here



                                                        4. Restart your system


                                                        5. Start Docker for Windows, search Docker in the search bar in Windows. Make sure it is running.



                                                        6. You should also go to Services.msc and make sure the services Docker Engine and Docker for Windows Service are running.



                                                          enter image description here




                                                        7. At last, you must check your Nuget.config file from C:UsersSibeeshAppDataRoamingNuGet. For me, the content of that file was as below.



                                                          <?xml version="1.0" encoding="utf-8"?>
                                                          <configuration>
                                                          <packageSources>
                                                          <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
                                                          </packageSources>
                                                          <packageRestore>
                                                          <add key="enabled" value="True" />
                                                          <add key="automatic" value="True" />
                                                          </packageRestore>
                                                          <bindingRedirects>
                                                          <add key="skip" value="False" />
                                                          </bindingRedirects>
                                                          <packageManagement>
                                                          <add key="format" value="0" />
                                                          <add key="disabled" value="False" />
                                                          </packageManagement>
                                                          </configuration>



                                                          Hope this helps.








                                                        share|improve this answer




























                                                          1












                                                          1








                                                          1







                                                          I was getting this same error while running RUN dotnet restore in my Dockerfile using docker-compose up command in Windows 10.



                                                          enter image description here



                                                          I have tried all the possible solution provided on the internet and was also keep an eye on this open issue. Finally, after spending more than 8 hours, by following the preceding steps, I was able to fix my issue.




                                                          1. Uninstall Docker from your system

                                                          2. Restart your system


                                                          3. Install Docker from this link. Below is the version of my Docker



                                                            enter image description here



                                                          4. Restart your system


                                                          5. Start Docker for Windows, search Docker in the search bar in Windows. Make sure it is running.



                                                          6. You should also go to Services.msc and make sure the services Docker Engine and Docker for Windows Service are running.



                                                            enter image description here




                                                          7. At last, you must check your Nuget.config file from C:UsersSibeeshAppDataRoamingNuGet. For me, the content of that file was as below.



                                                            <?xml version="1.0" encoding="utf-8"?>
                                                            <configuration>
                                                            <packageSources>
                                                            <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
                                                            </packageSources>
                                                            <packageRestore>
                                                            <add key="enabled" value="True" />
                                                            <add key="automatic" value="True" />
                                                            </packageRestore>
                                                            <bindingRedirects>
                                                            <add key="skip" value="False" />
                                                            </bindingRedirects>
                                                            <packageManagement>
                                                            <add key="format" value="0" />
                                                            <add key="disabled" value="False" />
                                                            </packageManagement>
                                                            </configuration>



                                                            Hope this helps.








                                                          share|improve this answer















                                                          I was getting this same error while running RUN dotnet restore in my Dockerfile using docker-compose up command in Windows 10.



                                                          enter image description here



                                                          I have tried all the possible solution provided on the internet and was also keep an eye on this open issue. Finally, after spending more than 8 hours, by following the preceding steps, I was able to fix my issue.




                                                          1. Uninstall Docker from your system

                                                          2. Restart your system


                                                          3. Install Docker from this link. Below is the version of my Docker



                                                            enter image description here



                                                          4. Restart your system


                                                          5. Start Docker for Windows, search Docker in the search bar in Windows. Make sure it is running.



                                                          6. You should also go to Services.msc and make sure the services Docker Engine and Docker for Windows Service are running.



                                                            enter image description here




                                                          7. At last, you must check your Nuget.config file from C:UsersSibeeshAppDataRoamingNuGet. For me, the content of that file was as below.



                                                            <?xml version="1.0" encoding="utf-8"?>
                                                            <configuration>
                                                            <packageSources>
                                                            <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
                                                            </packageSources>
                                                            <packageRestore>
                                                            <add key="enabled" value="True" />
                                                            <add key="automatic" value="True" />
                                                            </packageRestore>
                                                            <bindingRedirects>
                                                            <add key="skip" value="False" />
                                                            </bindingRedirects>
                                                            <packageManagement>
                                                            <add key="format" value="0" />
                                                            <add key="disabled" value="False" />
                                                            </packageManagement>
                                                            </configuration>



                                                            Hope this helps.









                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited Jul 23 '18 at 7:16

























                                                          answered Jul 21 '18 at 13:21









                                                          Sibeesh VenuSibeesh Venu

                                                          5,30432549




                                                          5,30432549























                                                              1














                                                              I was getting the same error while trying to browse the NuGet Package, to resolve the same followed below step



                                                              1- go to %appdata%NuGetNuGet.config



                                                              2- Verify the urls mentioned in that config



                                                              3- Remove the url which is not required



                                                              4- Restart visual studio and check






                                                              share|improve this answer






























                                                                1














                                                                I was getting the same error while trying to browse the NuGet Package, to resolve the same followed below step



                                                                1- go to %appdata%NuGetNuGet.config



                                                                2- Verify the urls mentioned in that config



                                                                3- Remove the url which is not required



                                                                4- Restart visual studio and check






                                                                share|improve this answer




























                                                                  1












                                                                  1








                                                                  1







                                                                  I was getting the same error while trying to browse the NuGet Package, to resolve the same followed below step



                                                                  1- go to %appdata%NuGetNuGet.config



                                                                  2- Verify the urls mentioned in that config



                                                                  3- Remove the url which is not required



                                                                  4- Restart visual studio and check






                                                                  share|improve this answer















                                                                  I was getting the same error while trying to browse the NuGet Package, to resolve the same followed below step



                                                                  1- go to %appdata%NuGetNuGet.config



                                                                  2- Verify the urls mentioned in that config



                                                                  3- Remove the url which is not required



                                                                  4- Restart visual studio and check







                                                                  share|improve this answer














                                                                  share|improve this answer



                                                                  share|improve this answer








                                                                  edited Oct 9 '18 at 5:56









                                                                  Nadeem_MK

                                                                  6,06073349




                                                                  6,06073349










                                                                  answered Oct 3 '18 at 10:47









                                                                  Shradha ShilvantShradha Shilvant

                                                                  111




                                                                  111























                                                                      1














                                                                      I have stumbled across this issue when trying to run nuget.exe via Jenkins (configured as a service, by default using Local System account). I have edited C:WindowsSystem32configsystemprofileAppDataRoamingNuGetNuGet.Config file which looks like the following:



                                                                      <?xml version="1.0" encoding="utf-8"?>
                                                                      <configuration>
                                                                      <config>
                                                                      <add key="http_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                      <add key="https_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                      </config>

                                                                      <packageSources>
                                                                      <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
                                                                      </packageSources>

                                                                      </configuration>


                                                                      In order to test command prompt can be started via PSTools:



                                                                      psexec -i -s CMD


                                                                      and actual test run in the newly created cmd windows (runs as Local System):



                                                                      path_to_nugetnuget.exe restore "path_to_solutiontheSolution.sln"





                                                                      share|improve this answer






























                                                                        1














                                                                        I have stumbled across this issue when trying to run nuget.exe via Jenkins (configured as a service, by default using Local System account). I have edited C:WindowsSystem32configsystemprofileAppDataRoamingNuGetNuGet.Config file which looks like the following:



                                                                        <?xml version="1.0" encoding="utf-8"?>
                                                                        <configuration>
                                                                        <config>
                                                                        <add key="http_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                        <add key="https_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                        </config>

                                                                        <packageSources>
                                                                        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
                                                                        </packageSources>

                                                                        </configuration>


                                                                        In order to test command prompt can be started via PSTools:



                                                                        psexec -i -s CMD


                                                                        and actual test run in the newly created cmd windows (runs as Local System):



                                                                        path_to_nugetnuget.exe restore "path_to_solutiontheSolution.sln"





                                                                        share|improve this answer




























                                                                          1












                                                                          1








                                                                          1







                                                                          I have stumbled across this issue when trying to run nuget.exe via Jenkins (configured as a service, by default using Local System account). I have edited C:WindowsSystem32configsystemprofileAppDataRoamingNuGetNuGet.Config file which looks like the following:



                                                                          <?xml version="1.0" encoding="utf-8"?>
                                                                          <configuration>
                                                                          <config>
                                                                          <add key="http_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                          <add key="https_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                          </config>

                                                                          <packageSources>
                                                                          <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
                                                                          </packageSources>

                                                                          </configuration>


                                                                          In order to test command prompt can be started via PSTools:



                                                                          psexec -i -s CMD


                                                                          and actual test run in the newly created cmd windows (runs as Local System):



                                                                          path_to_nugetnuget.exe restore "path_to_solutiontheSolution.sln"





                                                                          share|improve this answer















                                                                          I have stumbled across this issue when trying to run nuget.exe via Jenkins (configured as a service, by default using Local System account). I have edited C:WindowsSystem32configsystemprofileAppDataRoamingNuGetNuGet.Config file which looks like the following:



                                                                          <?xml version="1.0" encoding="utf-8"?>
                                                                          <configuration>
                                                                          <config>
                                                                          <add key="http_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                          <add key="https_proxy" value="http://proxy_hostname_or_ip:3128" />
                                                                          </config>

                                                                          <packageSources>
                                                                          <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
                                                                          </packageSources>

                                                                          </configuration>


                                                                          In order to test command prompt can be started via PSTools:



                                                                          psexec -i -s CMD


                                                                          and actual test run in the newly created cmd windows (runs as Local System):



                                                                          path_to_nugetnuget.exe restore "path_to_solutiontheSolution.sln"






                                                                          share|improve this answer














                                                                          share|improve this answer



                                                                          share|improve this answer








                                                                          edited Jan 1 at 16:48

























                                                                          answered Dec 31 '18 at 12:23









                                                                          AlexeiAlexei

                                                                          11k116067




                                                                          11k116067























                                                                              0














                                                                              Some development environment may not be using neither a browser nor a proxy.



                                                                              One solution would downloading the package from nugget such as the https://dotnet.myget.org/F/dotnet-core/api/v3/index.json to a shared directory then execute the following:



                                                                              dotnet add package Microsoft.AspNetCore.StaticFiles -s "shared drive:index.json"


                                                                              I hope that works for you.
                                                                               






                                                                              share|improve this answer






























                                                                                0














                                                                                Some development environment may not be using neither a browser nor a proxy.



                                                                                One solution would downloading the package from nugget such as the https://dotnet.myget.org/F/dotnet-core/api/v3/index.json to a shared directory then execute the following:



                                                                                dotnet add package Microsoft.AspNetCore.StaticFiles -s "shared drive:index.json"


                                                                                I hope that works for you.
                                                                                 






                                                                                share|improve this answer




























                                                                                  0












                                                                                  0








                                                                                  0







                                                                                  Some development environment may not be using neither a browser nor a proxy.



                                                                                  One solution would downloading the package from nugget such as the https://dotnet.myget.org/F/dotnet-core/api/v3/index.json to a shared directory then execute the following:



                                                                                  dotnet add package Microsoft.AspNetCore.StaticFiles -s "shared drive:index.json"


                                                                                  I hope that works for you.
                                                                                   






                                                                                  share|improve this answer















                                                                                  Some development environment may not be using neither a browser nor a proxy.



                                                                                  One solution would downloading the package from nugget such as the https://dotnet.myget.org/F/dotnet-core/api/v3/index.json to a shared directory then execute the following:



                                                                                  dotnet add package Microsoft.AspNetCore.StaticFiles -s "shared drive:index.json"


                                                                                  I hope that works for you.
                                                                                   







                                                                                  share|improve this answer














                                                                                  share|improve this answer



                                                                                  share|improve this answer








                                                                                  edited Sep 20 '17 at 1:47









                                                                                  Phani Kumar M

                                                                                  3,8191723




                                                                                  3,8191723










                                                                                  answered Sep 20 '17 at 0:47









                                                                                  Charles MosesCharles Moses

                                                                                  1




                                                                                  1























                                                                                      0














                                                                                      Go to -> Tools -> Extensions and Updates and uninstall NuGet package manager.. restart visual studio and reinstall it.... every thing will set to normal






                                                                                      share|improve this answer




























                                                                                        0














                                                                                        Go to -> Tools -> Extensions and Updates and uninstall NuGet package manager.. restart visual studio and reinstall it.... every thing will set to normal






                                                                                        share|improve this answer


























                                                                                          0












                                                                                          0








                                                                                          0







                                                                                          Go to -> Tools -> Extensions and Updates and uninstall NuGet package manager.. restart visual studio and reinstall it.... every thing will set to normal






                                                                                          share|improve this answer













                                                                                          Go to -> Tools -> Extensions and Updates and uninstall NuGet package manager.. restart visual studio and reinstall it.... every thing will set to normal







                                                                                          share|improve this answer












                                                                                          share|improve this answer



                                                                                          share|improve this answer










                                                                                          answered Jan 1 at 12:19









                                                                                          Kadeer MughalKadeer Mughal

                                                                                          569




                                                                                          569























                                                                                              0














                                                                                              In my case i had had Fiddler running which had changed my proxy settings






                                                                                              share|improve this answer




























                                                                                                0














                                                                                                In my case i had had Fiddler running which had changed my proxy settings






                                                                                                share|improve this answer


























                                                                                                  0












                                                                                                  0








                                                                                                  0







                                                                                                  In my case i had had Fiddler running which had changed my proxy settings






                                                                                                  share|improve this answer













                                                                                                  In my case i had had Fiddler running which had changed my proxy settings







                                                                                                  share|improve this answer












                                                                                                  share|improve this answer



                                                                                                  share|improve this answer










                                                                                                  answered Feb 4 at 13:06









                                                                                                  DooieDooie

                                                                                                  73572142




                                                                                                  73572142






























                                                                                                      draft saved

                                                                                                      draft discarded




















































                                                                                                      Thanks for contributing an answer to Stack Overflow!


                                                                                                      • Please be sure to answer the question. Provide details and share your research!

                                                                                                      But avoid



                                                                                                      • Asking for help, clarification, or responding to other answers.

                                                                                                      • Making statements based on opinion; back them up with references or personal experience.


                                                                                                      To learn more, see our tips on writing great answers.




                                                                                                      draft saved


                                                                                                      draft discarded














                                                                                                      StackExchange.ready(
                                                                                                      function () {
                                                                                                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f41185443%2fnuget-connection-attempt-failed-unable-to-load-the-service-index-for-source%23new-answer', 'question_page');
                                                                                                      }
                                                                                                      );

                                                                                                      Post as a guest















                                                                                                      Required, but never shown





















































                                                                                                      Required, but never shown














                                                                                                      Required, but never shown












                                                                                                      Required, but never shown







                                                                                                      Required, but never shown

































                                                                                                      Required, but never shown














                                                                                                      Required, but never shown












                                                                                                      Required, but never shown







                                                                                                      Required, but never shown







                                                                                                      Popular posts from this blog

                                                                                                      Monofisismo

                                                                                                      Angular Downloading a file using contenturl with Basic Authentication

                                                                                                      Olmecas