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
Invalid or non-existent authentication information #941
Comments
OK, I have got it done. I turns out that I have to create ~/.pypirc Entering password in terminal just doesn't work. It's very likely a bug. Because password is correct and it didn't give me chance to enter username. |
I was looking through this code recently. I think if there's no pypirc entry present, an empty username is used. The behavior exists upstream in distutils. I did draft a change which would allow the username to default to I'll send a PR for review. |
Heres What I Did To Fix: Created
|
I ran into the same problem. I'm on a new OS X Sierra. Adding [server-login] entry to ~/.pypirc seemed to fix it http://www.seanbehan.com/how-to-fix-pypi-upload-failed-403-invalid-or-non-existent-authentication-information/ |
@seanbehan: That |
To the best of my knowledge, the behavior is working as expected. |
@jaraco Thanks for the reply. I am using python 2.7 (homebrew python install on new mac book pro sierra) and the info from the docs you supplied does not work for me. I have tried many variations and only [server-login] seems to work. |
Same problem here, as well with homebrew on macOS Sierra |
same for me, python2.7 only [server-login] seems to work, everything results in asking for password at upload, and then auth problem. Although same config, unchanged, same upload command, unchanged, same python major version (2.7) used to work a few months a go with config format @dover247 suggests |
I just now attempted a new release and can report the exact same experience as @tgalal. Thanks to @seanbehan for taking the time to post a workaround, which worked perfectly well for me. |
Well, the server-login workaround is a bad one, and it will probably break at some point. I wonder if this issue has emerged due to the fairly recent changes to support warehouse. Setuptools patches upload to use For what it's worth, I upload packages to PyPI at least weekly. I use the latest setuptools and Python and my pypirc looks like this:
There's no password entry because I rely on the keyring support to resolve the password (and store it securely). |
The very existence of this issue, the number of people commenting, etc, shows this stuff is really quite bad :( Could someone explain why |
@jaraco Thanks. |
The legacy URL is something that the new Warehouse service provides for compatibility with Python (distutils). That URL will continue to work after PyPI.python.org is removed. |
It's not working for me. This is my file:
gives me this error
when I run The full thing is:
running
|
I observed the |
Getting this same issue with Having my
|
The [distutils] section helped, though it seems like a setuptools bug that asks for a password that is never going to work without asking for a username. Also, the documentation at https://packaging.python.org/tutorials/distributing-packages/#uploading-your-project-to-pypi is wrong so...it took quite a bit of flailing to figure this out. The pypirc solution is great, but why doesn't setuptools prompt correctly from the command line in the first place? |
It could also prompt to write the data into the pypirc file. There seems to be many super trivial changes that can be made to make this a lot better.
|
Well I made it work by trying many times with different settings, I think that doing a |
Same problem here, using: Ubuntu 17.04 |
The upload command was originally implemented in distutils. Setuptools has only extended it. Nevertheless, in 20.10, Setuptools adds prompting support.
If you think you can improve the guide, your help would be most appreciated. Please see the section on contributing to the guide. |
I had similar problem but it turned out to be my repository parameter was wrong in my .pypirc file. And you do not need to specify repository any more. Once I removed it, my upload succeeded. |
The same issue.
Trying to upload: python setup.py sdist
...
python setup.py upload
Password:
error: No dist file created in earlier command Ok, let's google & try again:
The login/password pair is correct, I have just logged in with it. |
I fixed the problem by following the instructions written down here: https://packaging.python.org/guides/migrating-to-pypi-org/#uploading. In my case, I used distutils 2.7.13, and removed the repository line from my ~/.pypirc file: [distutils] [pypi] Hope this helps! |
This comment has been minimized.
This comment has been minimized.
I hit this same error. I changed my password on PyPI and was trying to use the new one. I can upload successfully with my old password. Seems like something is broken with password reseting. |
If you get a Mine weren't active yet, which gave me the 403 response. |
By providing username and password in upload.py is worked for me.
|
These docs don't mention the These docs do: https://packaging.python.org/guides/migrating-to-pypi-org/#uploading :) |
I'm able to upload my package to I've tried entering the username and password manually and using the settings in the Any ideas where the issues is? |
I had the same problem @cnobile2012, until I realized I needed a separate registration, login etc. for test as well as the regular pypi server. |
I lost one hour on this and then I figured out that both my test and upload accounts (which used to work before) had an unverified email. After verifying the email everything works expected as it used to be. |
@capooti You should have been getting an error message indicating that your email address needed verification, was this not the case? |
@di I didn't get that message |
So there is no way to upload the package from command line only. There is no way to workaround the need of a |
I made a .pypirc in my home directory Dint add repo Worked for me |
After reading a few posts to this thread @Mr-Optimistic provided the answer to my issue. Up until now, I didn't know there was the directive |
BTW |
I can't reproduce how I got confused, but I was under the impression
So how is this supposed to work in CI? Without access to home directory? How can I grab my creds out of env vars? How do I manage two pypi users? edit: seems twine is the replacement for these tools |
It also took me an hour to realize that one needs a separate account for |
https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives currently says:
Is there somewhere else that would be better for that information? Seems like it's in the right spot to me. |
I don't know how I missed that, but apparently it happened 😄. |
You can create a test.pypi.org account here: https://test.pypi.org/account/register/ |
I agree with you!!! I also spend half an hour on it and find I don't do the registration for the test one. |
Instead of write |
same error
|
If you are using an api token make sure to set user as |
And you ,my friend,you are the true hero! |
When I run
python setup.py sdist upload
I always get:
It never asks me to enter my username but only password. So I assume the username is the same as when I run "register".
I am pretty sure that password I entered is correct because I can login https://pypi.python.org/pypi
Could you please help? I am not new to pypi. I published several packages before. But now I am confused. What has changed recently?
The text was updated successfully, but these errors were encountered: