NuGet "NU1301: Unable to load the service index" in CI
NU1301 is the package-graph restore’s code for a source whose service index could not be loaded. Restore could not read the feed’s index.json, so it has no endpoint map and fails the whole graph.
What this error means
A dotnet restore (or an implicit restore inside dotnet build) aborts with NU1301 naming the source it could not reach. It frequently clears on its own when a public feed has a transient blip, which is the hallmark of a network issue rather than a config one.
error NU1301: Unable to load the service index for source
https://api.nuget.org/v3/index.json.Common causes
Transient feed outage or DNS blip
A momentary DNS failure or a 5xx from the feed makes the service index unreachable for that run. Public feeds occasionally return transient errors that succeed on retry.
Feed firewalled off the runner
An internal feed that the runner cannot route to, or an egress firewall blocking the feed host, makes the index request fail every time until connectivity is restored.
How to fix it
Retry and confirm reachability
Because NU1301 is usually transient, re-run restore and check the source resolves from the runner.
dotnet restore --verbosity normal
dotnet nuget list source
curl -I https://api.nuget.org/v3/index.jsonOpen egress to the feed host
- Allowlist the feed host (and its CDN/blob storage) through the runner firewall.
- Set
HTTP_PROXY/HTTPS_PROXYif the runner must egress through a proxy. - Confirm internal feeds are reachable from the runner subnet, not just from a developer VPN.
How to prevent it
- Wrap
dotnet restorein a bounded retry for transient NU1301 failures. - Cache the global packages folder so a feed blip does not block a re-run.
- Mirror critical packages into an internal feed to reduce dependence on public feeds.