Fix NU1301: Unable to Load the Service Index for NuGet Source

Quick answer. Verify the effective source URL and connectivity from the runner. Resolve proxy, TLS trust or feed authentication using the approved configuration.

Applies to. .NET SDK and MSBuild

Hosting and build diagnosticsIdentify effective feedCheck reachability and authenticationRestore
Identify effective feed → Check reachability and authentication → Restore

What does the error look like?

Local restore works, but a CI runner cannot load an approved package feed service index.

How do you diagnose the cause?

Read all restore messages and confirm the NuGet.Config hierarchy. Check DNS and HTTPS from the same runner, confirm the source exists and restore uses its authorized credential provider. Keep tokens out of command lines and logs.

Worked example

Use the relevant portion below in a development or staging environment. Match the existing application’s packages, settings, and environment before applying the change.

CLI
dotnet nuget list source
dotnet restore ./src/Web/Web.csproj --verbosity normal

In Blogger preview, you can select the snippet and copy it directly.

How do you verify the fix?

CheckExpected behavior
RestoreRestore retrieves the intended packages from configured trusted sources.
Repeat with the original failing input or setupThe relevant error is reproducible under the old conditions and resolved under the corrected conditions

These are expected results to validate in your environment.

What should you check first if the error returns?

Verify the effective source URL and connectivity from the runner. Resolve proxy, TLS trust or feed authentication using the approved configuration.

Official documentation · ASP.NET tutorials

Comments