-
Notifications
You must be signed in to change notification settings - Fork 986
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
Change username & API token prefix, to make Travis auth easier #6287
Comments
A bit unfortunate that we chose something that requires quoting as the username. It'd be nice to not have this friction when folks migrate to API keys. Since we're still in the beta period, I think it would be reasonable to change this (but still support
|
@dstufft any thoughts here? I'm +1 for updating the keys to I'm -1 on backward compatibility for longer than a few days. We know who have provisioned API tokens and can email them to give them a headsup 24 hours before disabling the older grammar. |
Yeah, I should be clear: I meant backwards compatibility until ~the end of the beta period. |
I'm +1 for updating keys & username, and -1 on backward compatibility for longer than a few days. @woodruffw heads-up. |
Thanks for the ping! I'll make a PR for these changes now. |
We have updated the token username and prefix: username: These changes should alleviate the need for escaping heroics. The previous format will continue to work for now, but users will be notified to update their configurations to match the new syntax before the beta period is over. |
Just made the change, and |
@ZaxR Did you encrypt the token? I recommend you do, so only your repo can upload. I didn't need to escape anything when encrypting:
|
I just puy the token into travis without escaping anything and it works. I don't think the hyphen is a special character in bash? |
Just wanted to close the loop on my final comment: The hyphen does NOT need escaping. The issue I was facing was with setting the env var via the travis UI. The instructions @hugovk work well. For folks interested in a complete example: https://github.com/ZaxR/bulwark/blob/master/.travis.yml |
Just wanted to share a potential pain point for folks using the new PyPI API tokens for authentication via a travis.yaml. The @token username needs to be wrapped in quotes and the
:
afterpypi
needs to be escaped to work, otherwise you hit a 403 error (thanks for the help tracking this down @ewdurbin).If you're using the environment variables through Travis' UI, the following works:
If you're encrypting the token via the command line, you can just wrap your token in quotes:
travis encrypt "<your-pypi_token>" --add deploy.password [--com]
The text was updated successfully, but these errors were encountered: