-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Omitting trailing slash on some PEP 503 repositories prevents inferring the correct upload URL #6687
Comments
The token issue is external to Poetry -- Regarding the trailing slash, we can't really surface errors here as there is no feedback from the repository on our requests failing. The nature of these legacy/'simple' APIs is to be undiscoverable and very much "leap before you look". It appears twine is normalizing the URL by adding a trailing slash -- it should be trivial to do the same in Poetry, if you are interested. |
I eventually worked out that the "unique identifier" I see on my TestPyPI account management page is not the API key, and that it cannot be recovered. I seem to have lost track of my original key while migrating to Linux and/or reinstalling Poetry, so I ended up having to generate a new one. I had not actually tried setting I am still confused: Where is the configuration info stored for |
It's stored in |
I see that after configuring |
You'll need to do it interactively -- |
Looks good. I guess there is nothing more here besides what is in issue #3600, and the rest was ultimately my oversight, so I consider the matter resolved now. |
Issue #3600 is closed and you have a reproduction here -- I am keeping this open to track the trailing slash normalization enhancement. |
Where should this file be? I looked in |
-vvv
option) and have included the output below. (not applicable)Issue
Apologies for reporting essentially two issues at once, but trying to figure out the first led directly into the second for me.
The first is the same basic issue reported in #3600, now in 1.2.1 - configuring
poetry config repositories.testpypi https://test.pypi.org/legacy
without the trailing slash caused silent failures.The thing is, I get silent failures this way even when using
twine
(orpoetry run twine
, as described in Issue #742) to upload instead would succeed. The only symptom is that the package does not appear on TestPyPI.Second issue: after adding the trailing slash and trying again, I got noisy failures instead -
As far as I can tell,
poetry config pypi-token.testpypi <API token>
doesn't actually do anything, despite everything I can find in the documentation and third-party guides. There is no update to the content of~/.config/pypoetry/config.toml
, and I get the error shown above when trying to usepoetry publish
. (If it is supposed to write information somewhere else, I have no idea how to verify that.) It seems I am forced to specify my actual username and password explicitly on the command line. Even setting the username to__token__
and password to the API token value, as described in PyPI's help, does not seem to work.The text was updated successfully, but these errors were encountered: