I have configured a PyPy package manager for my repository
and tried to upload the same package version with the save version more than once
When I have executed the following command: python3 -m twine upload --repository gitlab dist/
I have received the following error:
Content received from server:
{“message”:“Validation failed: File name has already been taken”}
HTTPError: 400 Bad Request from https://gitlab.com/api/v4/projects/19660947/packages/pypi
Bad Request
May i ask what version u are using? I can’t get the package manger enabled on gitlab CE. Edit:https://gitlab.com/help/user/packages/index states that we have it after release of 13.3.
this sounds like a bug to me, especially since it responds with 400/bad request. Can you re-test this again (might be fixed since GitLab.com is a rolling release to production every day). If the issue persists, please go ahead and create a bug report. Thanks!
That fixes the command but I do not want it to just skip existing packages. I want twine to be able to overwrite the existing package version. I think the only way to do this unfortunately is to either have a minor bump in the version (maybe based on git commit sha) or delete the package from the registry before uploading a new one
Getting this same issue trying to replace a file in one of my packages. Even if I go into the gitlab package registry and delete the file I want to overwrite, when I go to upload a new file I still get the error telling me the file name has already been taken.
I shouldn’t have to wipe the whole package just to overwrite one file in the package, but that’s the only thing I’ve found that works.
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first. If you attempt to publish the same package more than once, a 400 Bad Request error occurs.
I get that I can’t publish the same package multiple times, but I should be able to overwrite specific files in that package, especially if I’ve already deleted the files.