Fix it fast
Most likely: One configured NuGet source is unreachable, invalid, blocked by proxy/TLS/auth, or points at a local path that does not exist on this machine.
1. Confirm this is your error
error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. 2. Check the cause
dotnet nuget list source
dotnet restore -v minimal
dotnet nuget locals all --list 3. Apply the safe fix
# If the failing source is stale or wrong, disable it or fix the URL/path in NuGet.Config.
dotnet nuget disable source <source-name>
# If credentials or cache are stale, clear caches after fixing the source/auth config.
dotnet nuget locals all --clear
dotnet restore 4. Verify it works
dotnet restore -v minimal
dotnet build --no-restore Don't use unsafe shortcuts
- Do not keep a broken local folder source in repo or machine-level
NuGet.Config. - Do not mask a feed outage by adding random public sources.
- Do not clear caches repeatedly until you have checked the exact failing source URL or path.
Where the Request Failed
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.
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>