-
Notifications
You must be signed in to change notification settings - Fork 308
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
Can't enter password in Windows #671
Comments
Token had two underscores before and after it. |
@mathstar13 The password prompt doesn't show any characters while you type. For the PyPI token, I recommend copying & pasting it when you see the password prompt, and then pressing "Enter". If that doesn't work, can you copy and paste the output from Twine? Also, I edited your description to make |
|
If only we had variable debug level logging that could help us validate that the windows version of |
@mathstar13 Are you sure you're using the token for TestPyPI? As noted at https://test.pypi.org/help/#invalid-auth:
|
@sigmavirus24 I agree that more information about credentials would be useful, which is why I added that to the verbosity roadmap in #381 (comment) yesterday morning. |
@bhrutledge I saved it in a file and tried to use it before I created a pypi token. I'm sure then that I used the right one. |
@mathstar13 can you validate that the standard library works for you?
Should print whatever you type in even though you won't see it in the terminal as you type it. You don't need to copy/paste it here. Please also test that however you're inputting your token works as well in the same fashion. |
@sigmavirus24 When I try to run it, it tells me'
|
Maybe adjust it for your windows terminal? The example I posted works on a *nix box but I haven't used windows in too long to remember how to write that appropriately |
I went down the rabbit hole, installed Windows on a virtual machine, and was able to reproduce this when trying to paste the token in Command Prompt or PowerShell. In short, this is a known issue with
@mathstar13 Can you confirm that one of these works for you? To reproduce, I copied the text
Typing works fine:
However, I suspect more folks are running into this due to the use of tokens that are difficult to type. Aside: the |
@bhrutledge @sigmavirus24 Thanks for helping me out! I got my package uploaded! |
That's great, @mathstar13. Out of curiosity: did one of the workarounds I suggested work for you? If so, which one? |
@bhrutledge The one that helped me the best was just the one that showed me getpass. I couldn't paste my token, but I could enter my username and password. |
@mathstar13 Oh, I see. So, you just typed your username/password for TestPyPI directly? I was hoping you'd be able to paste your token. Did you try any of the workarounds that I suggested for pasting? |
@bhrutledge I couldn't use them because I'm in command prompt, not Windows Terminal. |
@mathstar13 One of these options should work from Command Prompt:
Here's an example of option 1 working for me: In the interest of enabling you to use your token (which is better than username/password) and assisting future Windows Python developers, would you be game to give one of those options a try? |
@bhrutledge 1 works fine. |
This gotcha feels worth documenting to me, along with a suggested workaround. I can think of a few places to do it, but I'm leaning towards adding it to https://pypi.org/help/#invalid-auth. @mathstar13 would that have been helpful to you? Do you have other suggestions on where/how to document it? @di what do you think? |
@bhrutledge That would be a good spot to document it. Also, maybe it should be documented in https://packaging.python.org/tutorials/packaging-projects/ if possible. If four people have reported it that I see, maybe others have tried to upload using twine and have been unable to do so. |
I don't understand this. Brian and I are both maintainers here. I'm for documenting this, but I'm not sure who the fourth person is here. |
@sigmavirus24 The four people that reported the issue are pypa/packaging-problems#384 pypa/packaging-problems#376 pypa/packaging-problems#355. Sorry that I was unclear about that. I updated my comment. |
This is now documented at https://pypi.org/help/#invalid-auth. I'm optimistic that the additional logging in #685 will also help folks diagnose this issue. |
@IVN-tone following up from #804: Did you try all 3 options that I listed? Did you read the suggestions at https://pypi.org/help/#invalid-auth? Can you try running
This issue is closed because thus far, we haven't identified anything that should be changed in Twine. The resolution has always had to do with pasting text in the Windows command prompt, which is documented at https://pypi.org/help/#invalid-auth. If that doesn't work, we can re-open this, or #804, but for now, I think it's useful to keep the conversation in one place, for future reference. |
Ok, I'll try it first and give the feedback, thank you! |
This comment has been minimized.
This comment has been minimized.
I tried all the instructions at https://pypi.org/help/#invalid-auth - nothing helped me. |
@IVN-tone I need you to copy and paste the entire output of For example, here's what happens when I use the wrong token for "Enter your password":
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ok, done:
|
Okay, the |
I just press the button
|
There's already a So, try changing your package name to something like |
still no success(( upd. I also tried in Anaconda prompt (in case the standard Windows command prompt has bug, maybe) - the same error. |
I'm stumped. Can you share the source code for your package? IE, put it on GitHub, or zip up the directory and attach it here? |
here is the link for .zip files: |
@IVN-tone I was able to unpack those files, change the package name, and upload to TestPyPI with a token. So, I'm back to thinking that there's something wrong with the token value. Can you run this command, and paste the output here? This will give you the same password prompt that Twine uses, and should verify whether or not the token value is being pasted properly.
You can also remove the |
done, the output is just 1 with len:
and without len the output is the following:
|
@IVN-tone Okay! So, there is something wrong with pasting your token; I discovered and documented this behavior in #671 (comment). I think you need to try the workarounds in that comment and #671 (comment) to see if you can get the Aside: I'm a little surprised that using |
Here it comes:
several facts look suprisingly for me:
Thank you so much for your support and being with me in such a strange thriller!:) |
@IVN-tone Excellent! I'm glad you were able to get it working. One note: after looking at the "properties" suggestion:
I think enabling this means you can use |
Oh, yes, you're right, I forgot about |
Your Environment
Thank you for taking the time to report an issue.
To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.
Windows 10
Python 3.8.2
I used pip.(pip install twine)
I don't know
https://github.com/mathstar13/easyapi
If you're having issues uploading a specific package, you must include a copy of the following:
PKG-INFO
file.pypirc
file (REMOVE ALL USERNAMES & PASSWORDS BEFORE UPLOADING)The Issue
The issue is that every time I try to upload, I enter
__token__
in username, but I can't enter ANY text in the password field.Steps to Reproduce
Use wheel on setup.py
Type in
python -m twine upload --repository testpypi dist/*
type in
__token__
as the usernameTry to type in the password
The text was updated successfully, but these errors were encountered: