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
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.
dotnet nuget list source
dotnet restore ./src/Web/Web.csproj --verbosity normalIn Blogger preview, you can select the snippet and copy it directly.
How do you verify the fix?
| Check | Expected behavior |
|---|---|
| Restore | Restore retrieves the intended packages from configured trusted sources. |
| Repeat with the original failing input or setup | The 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.
Comments
Post a Comment