Skip to content
Latchkey

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.

dotnet restore output
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.

Terminal
dotnet restore --verbosity normal
dotnet nuget list source
curl -I https://api.nuget.org/v3/index.json

Open egress to the feed host

  1. Allowlist the feed host (and its CDN/blob storage) through the runner firewall.
  2. Set HTTP_PROXY/HTTPS_PROXY if the runner must egress through a proxy.
  3. Confirm internal feeds are reachable from the runner subnet, not just from a developer VPN.

How to prevent it

  • Wrap dotnet restore in 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.

Frequently asked questions

What causes ""NU1301: Unable to load the service index""?
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.
How do I fix "NU1301: Unable to load the service index"?
Because NU1301 is usually transient, re-run restore and check the source resolves from the runner.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card