Commit 4ec31104 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'sselhorn-master-patch-12045' into 'master'

Updated error messages to both be 400 Bad Request

See merge request gitlab-org/gitlab!50807
parents 0849c691 c68d27e9
...@@ -233,15 +233,17 @@ password = ${env.CI_JOB_TOKEN} ...@@ -233,15 +233,17 @@ password = ${env.CI_JOB_TOKEN}
## Publish a PyPI package ## Publish a PyPI package
When publishing packages, note that: Prerequisites:
- You must [authenticate with the Package Registry](#authenticate-with-the-package-registry). - You must [authenticate with the Package Registry](#authenticate-with-the-package-registry).
- Your [version string must be valid](#ensure-your-version-string-is-valid). - Your [version string must be valid](#ensure-your-version-string-is-valid).
- The maximum allowed package size is 5 GB. - The maximum allowed package size is 5 GB.
- You can't upload the same version of a package multiple times. If you try, - You can't upload the same version of a package multiple times. If you try,
you receive the error `Validation failed: File name has already been taken`. you receive the error `400 Bad Request`.
- You cannot publish PyPI packages to a group, only to a project. - You cannot publish PyPI packages to a group, only to a project.
You can then [publish a package by using twine](#publish-a-pypi-package-by-using-twine).
### Ensure your version string is valid ### Ensure your version string is valid
If your version string (for example, `0.0.1`) isn't valid, it gets rejected. If your version string (for example, `0.0.1`) isn't valid, it gets rejected.
...@@ -308,7 +310,7 @@ python -m twine upload --repository <source_name> dist/<package_file> ...@@ -308,7 +310,7 @@ python -m twine upload --repository <source_name> dist/<package_file>
You cannot publish a package if a package of the same name and version already exists. 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 You must delete the existing package first. If you attempt to publish the same package
more than once, a `404 Bad request` error occurs. more than once, a `404 Bad Request` error occurs.
## Install a PyPI package ## Install a PyPI package
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment