Publishing Nuget package fails in self-hosted gitlab instance
We’re suddenly getting:
There was an error publishing a NuGet.Temporary.Package package
There was a timeout and the package was not published. Delete this package and try again.
Screenshot:
The build output has no indication of any errors:
Since we update every friday and publishing seemed to work a week ago (14th feb) I can’t help but think something broke in 16.9. I have updated to 16.9.1 in the hopes this would fix it but it didn’t. Note: I’m not saying 16.9.x broke something, I just don’t have any idea what else changed. I’ve checked wether maybe the disk was full but it has plenty space (36GB).
Steps to reproduce
Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
Configuration
We use the following CI config:
.gitlab-ci.yml
image : mcr.microsoft.com/dotnet/sdk:8.0
variables:
PROJECTNAME: $CI_PROJECT_TITLE
stages:
- build
- test
- package
#...
package:
stage: package
script:
- dotnet nuget add source "${CI_API_V4_URL}/projects/${NUGET_CI_PROJECT_ROOT_ID}/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
- dotnet test -c Release
- dotnet pack $PROJECTNAME -c Release -o artifacts /p:Version="${CI_COMMIT_TAG}"
- echo "$CI_COMMIT_TAG-$CI_COMMIT_SHA" >> artifacts/version
- dotnet nuget push "artifacts/*.nupkg" --source gitlab
artifacts:
name: $PROJECTNAME-$CI_COMMIT_TAG
paths:
- artifacts
expire_in: 2 days
only:
- tags
But the problem is the same when we publish from the commandline:
dotnet nuget push "FooProject.1.2.3.nupkg" --source "https://domain.foo/api/v4/projects/338/packages/nuget/index.json" -api-key glpat-XXXXXXXXXX
Versions
Please select whether options apply, and add the version information.
- Self-managed
- GitLab.com SaaS
- Self-hosted Runners
Component | Version |
---|---|
GitLab Shell | 14.33.0 |
GitLab Workhorse | v16.9.1 |
GitLab API | v4 |
GitLab KAS | v16.9.2 |
Ruby | 3.1.4p223 |
Rails | 7.0.8 |
PostgreSQL (main) | 13.13 |
PostgreSQL (ci) | 13.13 |
Redis | 7.0.15 |
Helpful resources
- I’ve tried googling but didn’t find much. I did find this but that was back in 14.x and should be fixed.
- I’ve also tried searching the forums but couldn’t find anything relevant.
- I have nothing but a hunch that the “Timeout” mentioned is not correct; after the push is ran the message appears (seemingly) immediately - within seconds. I’d expect a time to be something like 10 or 30 seconds or so.
- I wish I had a clue on where to look in which logfile to maybe figure out what is going on, but I have no clue where to look.