Closed anentropic closed 6 years ago
If your pypirc previously specified a different URL, we don't forcibly override this if I remember correctly. That may need to change (if and only if we detect the old URL)
I previously had no repository
specified so was using the default
I also am using default options (nothing in my .pypirc about repository), and it fails with this error.
This ought to be a high priority. AFAICS out of the box, twine does not do the one thing it is supposed to do, namely upload packages for publishing on PyPI.
Bumped into the same issue. The default needs to be updated. UPD: Actually, my .pypirc had repository URL, withdrawn.
Turns out I was using an old twine version kicking around in my system, instead of the one I had just installed - withdrawn.
I had to change my ~/.pypirc
from this
[pypi]
repository: https://pypi.python.org/pypi
username: jdoe
[pypitest]
repository: https://testpypi.python.org/pypi
username: jdoe
to this
[pypi]
repository: https://upload.pypi.org/legacy/
username: jdoe
[pypitest]
repository: https://test.pypi.org/legacy/
username: jdoe
Which resolved this problem for me.
I had a similar issue and I eventually debugged it to having the wrong version of twine...
@anentropic I have just released Twine version 1.11.0 and I think your problem should now be resolved. Thanks for reporting it, and thanks everyone here for sharing their reports!
For reference, here is the documentation on .pypirc
file formats -- I'm pretty sure that having a .pypirc
file that follows that format will work best and avoid edge cases in the future, with twine
and other tools.
[pypitest] repository: https://test.pypi.org/legacy/ username: jdoe
It really helps!
I have updated to
twine==1.9.1
and I run as:twine upload --config-file=.pypirc dist/*
I get this error:
I was able to workaround by adding:
to my
.pypirc
fileThe url mentioned in the error says that this should not be necessary if using latest version of twine. Is this wrong?