Error Knowledge Base NuGet NU1301

NU1301: Unable to load the service index for source

NuGet could not use one of the configured package sources because the source URL or local path was unavailable, invalid, or unreadable during restore.

Where the Request Failed

NuGet could not use one of the configured package sources because the source URL or local path was unavailable, invalid, or unreadable during restore.

NuGet is telling you the request failed before it got a clean response back. Treat the connection path and the failing environment as the first suspects, not the package or image name.

Restore connectivity to the package source

List configured sources first:dotnet nuget list source

If the failing source is local, fix the path or remove that source from NuGet.Config.

If the failing source is remote, confirm the exact v3 URL is reachable from the same machine or container and fix URL, proxy, TLS, or auth as needed.

Clear caches, then retry:dotnet nuget locals all --clear, then dotnet restore

Validation

Re-run the failing command and confirm the original code/message is gone, and confirm expected artifacts or outputs exist (packages restored, build/publish succeeds).

Why the Local Machine Blocked It

Usually this comes down to a configured local source path no longer exists on the machine or agent, the remote feed URL is wrong, blocked, or not serving a valid NuGet v3 service index, or TLS, proxy, or feed authentication problems prevent NuGet from reading the source.

Prove the Failing Environment Can Reach It

dotnet restore -v minimal succeeds without NU1301.

The failing source is either reachable and valid, or no longer configured for this build.

Mechanism

NuGet checks each configured source before it can resolve package metadata and discover download endpoints. If a configured local source path is missing, or a remote source URL cannot be reached or read correctly, restore can stop with NU1301.

Prevent Repeat Connectivity Failures

To prevent this, version-control a minimal NuGet.Config with only approved sources, and remove stale local paths and validate feed reachability in CI before restore.

Examples

error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.

Docs and source code

NuGet.Protocol service index failure message

User-facing message template. - GitHub

  <data name="Log_FailedToReadServiceIndex" xml:space="preserve">
    <value>Unable to load the service index for source {0}.</value>
  </data>
  <data name="Log_RetryingServiceIndex" xml:space="preserve">
    <value>Retrying service index request for source '{0}'.</value>

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list