Skip to content
Latchkey

dotnet restore "Unable to load the service index for source" in CI

dotnet restore tried to read the NuGet v3 service index at the top of the feed and could not. The feed is unreachable, temporarily down, or returning a non-success status, so no package can resolve from that source.

What this error means

restore stops with "error: Unable to load the service index for source https://.../index.json" before listing any package. Public nuget.org sources may still work while a private one fails.

dotnet
error NU1301: Unable to load the service index for source https://pkgs.internal.example.com/nuget/v3/index.json.
      Response status code does not indicate success: 500 (Internal Server Error).

Common causes

The feed is down or returning a server error

A 5xx from the service index endpoint means the feed itself is failing, not your request. Restore cannot enumerate packages until it recovers.

The feed URL is wrong or unreachable from the runner

A typo in the index.json URL, or a network path the runner cannot reach (proxy, firewall), makes the service index unloadable.

How to fix it

Confirm the feed URL and reachability

  1. Verify the index.json URL in nuget.config matches the feed exactly.
  2. Curl the service index from a runner step to confirm it returns 200.
  3. If it is a 5xx, retry once the feed recovers; the request is correct.
Terminal
curl -sSf https://pkgs.internal.example.com/nuget/v3/index.json

Fall back to nuget.org for public packages

If a private mirror is flaky, add nuget.org as a source so public packages still restore while the mirror recovers.

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

How to prevent it

  • Pin the exact index.json URL and commit nuget.config.
  • Keep a public fallback source for packages that do not require the private feed.
  • Cache restored packages so a transient feed outage does not fail every job.

Frequently asked questions

What causes ""Unable to load the service index for source""?
A 5xx from the service index endpoint means the feed itself is failing, not your request. Restore cannot enumerate packages until it recovers.
How do I fix "Unable to load the service index for source"?
Confirm the feed URL and reachability

Related guides

References

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