What you see
error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.Common causes
- Network timeouts or DNS failures reaching the feed.
- Proxy settings missing in the build environment.
- Expired or missing credentials for a private feed.
How to fix it
- 01
See which source fails
Detailed verbosity prints every request.
shell dotnet restore -v detailed - 02
Retry restores
Newer SDKs retry transient failures; on older ones, wrap restore in a retry loop.
shell for i in 1 2 3; do dotnet restore && break; sleep 10; done - 03
Use one feed that is close
Replace nuget.org with a regional cache in nuget.config.
nuget.config <packageSources> <clear /> <add key="cacheport" value="https://acme.cacheport.cc/nuget/v3/index.json" /> </packageSources>