-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Unable to load the service index for source https://api.nuget.org/v3/index.json. #8048
Comments
Hi @skt005, Thanks. |
hi @mpowrie , Can you please tell me Which DNS address we have to put here in order to work. Thanks |
Sure - |
#13 [build 5/8] RUN dotnet restore "./myFirstProject.csproj" Still Failing After Adding DNS entry please see my docker Compose file **#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build FROM build AS publish FROM base AS final |
in the above I am able to do both RUN curl "www.google.com" when I did without -k i am getting certificate exception |
Its not working out even after adding it |
This just started happening to me as well, worked yesterday, hosed today. Running the docker build on WSL. I can restore fine outside of docker. Updating DNS did not work, anyone have ideas? |
Facing the below error when dotnet restore is being executed from within docker Tried setting up dns property in Docker engine as suggested above. But no luck. Any solutions? |
Setting up "MaxProtocol" to TLS 1.2. For example on ubuntu image echo "MaxProtocol = TLSv1.2" >> /etc/ssl/openssl.cnf && dotnet restore |
For me the below steps before dotnet restore worked as ZScaler is installed on my machine. Exported ZScaler from Certificate store. COPY zscalar.cer . |
I think it could be firewall issue with laptop on accessing the URls from docker image |
Hey, I had the same issue, and I figured out that this problem disappears when I install curl or wget.
It seems like the distribution is missing some packages required for performing HTTPS calls. |
Hi All, I was also facing same issue and spend many days to resolve it but no luck, thanks to this article which helped me a lot. |
|
This worked for me too. Thank you! |
i have same issue docker file build of vs2022 error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. docker setting add dns section "dns":["1.1.1.1","8.8.8.8"] help me.. |
YES!!! This works for me! I am so glad I found this. I have been banging my head against this wall for way too long! |
this DNS doesn't help me. |
FYI, it did not help me either. My problem was that I was being blocked from accessing the Internet from inside the container. I needed to provide the root certificate in order to succeed. You can see my previous post for details. Hope this helps. |
In our case we run Kubernetes using Docker Desktop and deployed dotnet application, which stuck with a similar error
DNS name Did a try to set different MTU, but still see same 1500 inside the Pod vi "$HOME/Library/Group Containers/group.com.docker/settings.json"
"vpnKitMTU": 1472, checks
|
Thank you so much! |
Adding DNS entry worked for me. It is an issue docker intermediate container is not able to reach api.nuget.org. It could be due to firewall , vpn or any other issue specific to respective machine. "dns": [ |
For anyone else having this issue in WSL2, this fixed the problem for me: microsoft/WSL#8358 (comment) |
changed to real wifi network instead of phone hotspot. fixed it. |
I was able to resolve this by adding a NuGet.config file to project and point it to our proxy server. |
Windows 11, Rider development environment. |
Awesome. It works for me as well. |
I had the same issue with gitlab runners (local gitlab instance + local runner + PODMAN) . When trying to build the project using anything but gitlab runner - everything worked perfectly. However when we tried to use CI, the process failed with If you use podman with gitlab runners dns works. |
In my case it worked when I connected to a VPN i was using when i started off the build. |
Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/microservice-tutorial/docker-image
Operating System: windows
I am Geeting error while
executor failed running [/bin/sh -c dotnet restore]: exit code: 1
The text was updated successfully, but these errors were encountered: