Skip to content
Latchkey

dotnet nuget push timeout or 5xx from the feed in CI

A push that times out or returns a 5xx usually means the feed was slow or briefly unavailable, not that the package or key is wrong. The upload can be retried once the feed recovers.

What this error means

push fails with a timeout, "The operation was canceled", or "Response status code does not indicate success: 503 (Service Unavailable)" while uploading the nupkg.

dotnet
error: Response status code does not indicate success: 503 (Service Unavailable).
      https://api.nuget.org/v3/index.json

Common causes

The feed is briefly overloaded or down

A 5xx or timeout from the push endpoint reflects a transient feed condition, not a problem with your package.

A large package over a slow link

A big nupkg over a congested connection can exceed the push timeout on a single attempt.

How to fix it

Raise the timeout and retry

Give the upload more time and re-run the push once the feed recovers.

Terminal
dotnet nuget push *.nupkg --source private --api-key ${{ secrets.NUGET_KEY }} --timeout 600

Make republish idempotent

Use --skip-duplicate so a retry after a partial success does not fail with 409 on an already-uploaded version.

Terminal
dotnet nuget push *.nupkg --source private --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate

How to prevent it

  • Set a generous --timeout for large package uploads.
  • Use --skip-duplicate so retries are safe.
  • Retry transient feed 5xx rather than failing the whole publish.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →