-
Notifications
You must be signed in to change notification settings - Fork 995
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
With token, 403 Invalid or non-existent authentication information #6422
Comments
Does the This is the kind of issue that I'd be happy to dive in and find a solution for, but I feel uneasy with the circumstances. How can I test the production release process without creating a production release? Perhaps I should consider cutting 41.1.0.postN releases for the purpose of testing. Advice here would be welcomed. |
Is there anything on the backend of warehouse that you could correlate with that timestamp (2019-08-13T09:57:04, time zone unknown but probably UTC or UTC-0400)? edit: corrected to Aug 13, not Aug 3. |
Yes. I confirmed the token is prefixed with pypi- and I’m using the dunderscore token username. |
I've created a test build that is likely to replicate the issue. |
In this build, I was able to make a release using the token and bypassing DPL (I subsequently deleted the release from PyPI). So the issue lies with using DPL or something that DPL does. I did make other changes, such as building with pep517, but I suspect that's not pertinent. |
I've just had a similar issue uploading to pypi from travis. I've getting
However the upload to pypi succeeded! (I'm not sure if this is the same behaviour @jaraco saw?) All files seem to have been uploaded and the release seems to have worked fine. I got this twice, the first time with my password, I thought it might be related to the new token workflow, so I switched to a token and got the same result. Links:
|
Thanks for the report @samuelcolvin! Can you confirm that the token you're feeding to Travis includes the |
Interesting. That’s very different from the behavior I saw. In my failures, no artifacts were uploaded. My build would attempt to upload both wheel and sdist artifacts. Not sure if that’s relevant. |
Okay. I now think I understand the crux of my problem. It's this line:
In the non-DPL upload technique, the most straightforward way I've found to pass the credentials to twine is through environment variables, but because Travis expects variables to include both the key and the value, it's not possible to encrypt just the password (and travis is uninterested in supporting this use case); one is forced to encrypt the But when I tried to apply this routine to generate the encrypted form of the token for the setuptools project, which uses DPL, it expects the password/token only, and I didn't account for that in the setuptools project when changing the credential. I'm 90% certain that if I omit that prefix from the token that it will work. That doesn't explain the issue samuelcolvin experienced, so they may wish to file a separate ticket for that. I'm closing this ticket and will re-open if my explanation above doesn't pan out. |
I've revised my
|
I've created the 41.2 release using this new technique. |
@woodruffw yes, the token definitely included the prefix: looking back at my bash history I see Remember also, I got the exact same failure with the It looks like the release used |
|
sorry, ignore that, the error seems the same: https://travis-ci.com/samuelcolvin/aiohttp-toolbox/builds/124041776 |
In pypa/setuptools#1817, I reported an issue where the latest version of setuptools failed to release. Setuptools uses a proven mechanical release process, but in this latest release, I switched to using token-based authentication. This wasn't my first time using token-based auth. I'd previously cut a release of configparser using a (all projects) token. I used the same token and code to inject that token into the .travis config:
Yet, when it ran, the job produced this error:
Reverting the change and going back to password-based releases worked around the issue.
It's not yet obvious to me where the error lies. Benoit suggested maybe it's because Setuptools uses the default PyPI deployer and twine 1.13 but configparser uses the latest. It's also possible that I fat-fingered something in the process (though unlikely as most of the process is mechanized).
I'm filing this ticket here to capture the issue and solicit any advice and to capture any solution once identified. This issue is specifically about token-based authentication failures on Travis uploads.
The text was updated successfully, but these errors were encountered: