In my GitLab I have a multiple dotnet core projects (plugins) placed under a group named Plugins, in each one of these projects I added a CI steps to pack them in nuget packages and push them to the GitLab package registry. I followed the documentation : https://docs.gitlab.com/ee/user/packages/nuget_repository/index.html and in the .gitlab-ci.yaml I placed this config :
image: mcr.microsoft.com/dotnet/sdk:5.0
stages:
- deploy
deploy:
stage: deploy
script:
- dotnet pack -c Release
- dotnet nuget add source "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
- dotnet nuget push "bin/Release/*.nupkg" --source gitlab
only:
- master
but instead of adding a project level source (which is working for me)"$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json"
I replaced it to group level endpoint "$CI_SERVER_URL/api/v4/groups/{group-id}/-/packages/nuget/index.json" with a deploy token for the authentication because I wanted to have one source for all projects under that group, it shows this error each time the nuget cmd try to push the package
error: ERROR: This version of nuget.exe does not support updating packages to package source my-source
any ideas?