Skip to content
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

Hint about automatic deploy to PyPI #20

Closed
lelit opened this issue Aug 7, 2017 · 4 comments
Closed

Hint about automatic deploy to PyPI #20

lelit opened this issue Aug 7, 2017 · 4 comments

Comments

@lelit
Copy link
Contributor

lelit commented Aug 7, 2017

I'm trying to setup automatic wheel deploy from Travis to PyPI for a couple of projects of myne.

Everything goes well, the packages get built within the manylinux1 docker image, and tests pass, but when twine tries to upload to PyPI, it fails with

Uploading pg_query-0.2-cp36-cp36m-manylinux1_i686.whl
HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/

I followed the examples and read the available documentation, but as this is my first time at that, it may be that I'm missing the obvious.

My .travis.yml sets TWINE_USERNAME, and I set the TWINE_PASSWORD in the Travis project settings to the value obtained by executing travis encrypt 'my-pypi-password' as explained here. I tried also with travis encrypt 'TWINE_PASSWORD=my-pypi-password' with the same result.

What am I doing wrong (or not doing at all)?

Can you either shed some light on me, or point me to whatever place where I can learn more on the process?

Thanks in advance!

@tgarc
Copy link
Contributor

tgarc commented Aug 7, 2017

@lelit I suppose this could be lots of things. But one really nefarious thing I found out about encrypting passwords on travis-ci was that you have to escape special characters. (see issue here). Could that be your issue? Either way, this is definitely twine and/or travis-ci related so you should be debugging those parts, not cibuildwheel.

@joerick
Copy link
Contributor

joerick commented Aug 7, 2017

Hey @lelit! I've got a working example repo set up here: https://github.com/joerick/cibuildwheel-autopypi-example .

I set the TWINE_PASSWORD variable in the Travis settings, rather than putting an encrypted key in .travis.yml. Could be less error-prone?

I set the TWINE_PASSWORD in the Travis project settings to the value obtained by executing travis encrypt 'my-pypi-password'

Oh, that might be your problem - if you're typing a password into the Travis settings console, you shouldn't encrypt it.

@lelit
Copy link
Contributor Author

lelit commented Aug 7, 2017

Thanks both, I will report back!

@lelit
Copy link
Contributor Author

lelit commented Aug 7, 2017

Yeah @joerick, you were right, that was it!

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants