Skip to content

Dotnet Nuget push - Error publishing · Unexpected error: ActiveRecord::StatementInvalid

Publishing a Nuget package through Gitlab Pipelines results in a log file saying it went alright, but checking the actual nuget repository doesn't show me the just published Nuget package.

The package registry mentions: Error publishing · Unexpected error: ActiveRecord::StatementInvalid whilst the gitlab runner log says:

Pushing Package.0.34.0.nupkg to 'https://gitlab.com/api/v4/projects/<projectNumber>/packages/nuget'...
  PUT https://gitlab.com/api/v4/projects/<projectNumber>/packages/nuget/
  Created https://gitlab.com/api/v4/projects/<projectNumber>/packages/nuget/ 1239ms

Command i'm running from the CI: dotnet nuget push *.nupkg --source gitlab

The weird thing is alpha (preview) packages are created succesfully, however upon tagging we get this error. Tagging causes the pipeline to run and push the nuget package without the alpha in the versioning