Hello dear friends,
I thought I should share this issue I’m having publishing a python package with to PyPI.
It seems to be authenticating correctly with my user here: https://travis-ci.com/github/gmagno/pycut/jobs/342784699#L155
but eventually fails with: HTTPError: 403 Client Error: Invalid or non-existent authentication information.
Here: https://travis-ci.com/github/gmagno/pycut/jobs/342784699#L257
Any tips would be much appreciated.
Thanks in advance,
gmagno
Hey, thank you for your reply.
Is there anywhere in the log you can see that I’m hitting the wrong API? Cause I am confident I was not. I’ve actually tried all possibilities already, --org, --com and --pro.
Both travis login
and travis encrypt
commands I am passing --pro.
Okay, apparently the problem was that I was using the wrong user. When using PyPI API tokens you need to use __token__
as user. I thought travis would take care of this.
1 Like
https://docs.travis-ci.com/user/deployment/pypi/ clearly says that you need to specify __token__
explicitly.
Apparently, Travis aren’t going to follow PyPI’s whim each time they change the meaning of the values.
However, __token__
is no longer “whim”, it’s been there for pretty long AFAIK, so it does make sense as a default.
You can create a PR against https://github.com/travis-ci/dpl/ and/or create a feature request if you wish.
1 Like