-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetry can't upload but twine works #1999
Comments
I seem to have the exact same error (at least the 403 error). The problem seems to occur when using stored API tokens or when using the |
BUMP -- I'm seeing this too. I was getting a 405 error - looks like I need twine as a dev dependency |
I just ran into the same issue. My password had a leading ^ in it and after changing my password i could finally publish. Maybe that helps someone :) |
Adding to this, my password had a ! in it. |
any idea what's going on here? This tripped me up for a few days before I noticed everything works fine with twine. |
Just Have the same Issue here!. IT seems that poetry doesn't have a way to build a new release into pypi. poetry publish is basically building the project again. but the name of the project already exist in pypi. the restriction are tight |
bump. same issue. Although found an interesting work around... when configuring an internal pypi source in the .toml as so... [[tool.poetry.source]]
name = 'mypi'
url = 'mypi_url' poetry publish -r mypi returns a 403 Forbidden UploadError UploadError
HTTP Error 403: Forbidden
at ~/.poetry/lib/poetry/publishing/uploader.py:216 in _upload
212│ self._register(session, url)
213│ except HTTPError as e:
214│ raise UploadError(e)
215│
→ 216│ raise UploadError(e)
217│
218│ def _do_upload(
219│ self, session, url, dry_run=False however, if I remove that from the .toml and configure the a repository in the command line poetry config repositories.mypi mypy_url poetry publish -r mypi Successfully publishes. Strange, I will also add my password also contains a special character similar to others that encountered the error. Obviously the preference is to have it configured in the .toml so others can publish without needing to config the repository themselves. |
Same issue here - weirdly, it did not happen with poetry 1.1, and only started with 1.2.
I tried with |
You're getting a 403 as you are trying to publish with empty credentials. The username/password request code was removed from Cleo and thus dropped by Poetry 1.2 (though I think it's buried in a beta in the changelog). I would suggest instead generating a token and storing it (https://python-poetry.org/docs/repositories/#configuring-credentials) -- typing a username and password every time is fairly fraught and likely to lead to insecure credential handling. |
Thanks! That does seem like a better system. |
Closing as there is no reproduction here and there's a wide variety of issues happening. If you have special characters in your password, you will have to escape them appropriately (this is related to your shell and not Poetry). The best way to avoid this is to follow the docs and use a token as there will be no special characters. Otherwise, set an environmental variable or edit the Poetry auth.toml directly (or just properly escape the |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
Poetry gets
403: Invalid or non-existent authentication information
but twine can upload correctly:
Another error output with PyPi "File already exists": twine get the 400 and reports the right error: poetry gets 403
The text was updated successfully, but these errors were encountered: