Can't Enter Client Token in Anaconda Prompt
Hello, I’m using the huggingface-cli login command in my Anaconda 3 Prompt, and it displays the HUGGINGFACE banner and asks for “Token:”, which I have fromHugging Face – The AI community building the future..  But then it won’t let me paste it or enter it manually.  I hit the keys on my keyboard and nothing happens.  When I press enter, I get this:Traceback (most recent call last):File “C:\Users\Desktop\anaconda3\lib\runpy.py”, line 197, in _run_module_as_mainreturn _run_code(code, main_globals, None,File “C:\Users\Desktop\anaconda3\lib\runpy.py”, line 87, inrun_codeexec(code, run_globals)File "C:\Users\Desktop\anaconda3\Scripts\huggingface-cli.exe_main.py", line 7, inFile “C:\Users\Desktop\anaconda3\lib\site-packages\huggingface_hub\commands\huggingface_cli.py”, line 41, in mainservice.run()File “C:\Users\Desktop\anaconda3\lib\site-packages\huggingface_hub\commands\user.py”, line 176, in run_login(self._api, token=token)File “C:\Users\Desktop\anaconda3\lib\site-packages\huggingface_hub\commands\user.py”, line 343, in _logintoken, name = REDACTED_TOKEN._validate_or_retrieve_token(token)File “C:\Users\Desktop\anaconda3\lib\site-packages\huggingface_hub\REDACTED_TOKEN.py”, line 691, in _validate_or_retrieve_tokenraise ValueError(“Invalid token passed!”)ValueError: Invalid token passed!I don’t know what’s causing this, I was hoping someone here could help me figure it out.  Thank you in advance for your help.
2022-09-07T05:48:26Z
I’m having the same issue, I’ve tried through anaconda as well as raw admin cmd. I’m able to paste the api everywhere else except in the prompt for some reason.
2022-09-07T06:44:20Z
Hey so I figured it out.  You can paste the token when prompted, and then press enter.  You won’t actually see the token pasted, but it is there, and it should work.  Hope that helps.
2022-09-07T21:46:14Z
No it doesn’t work, I get invalid token passed as response.
2022-09-08T01:52:22Z
I’m in the same boat with you Moo. I’ve tried and it still comes up with invalid token.
2022-09-09T10:24:04Z
Same issue here. I see the token prompt, but it ignores any inputs and copy-paste. Simply keeps the space blank.
2022-09-09T19:59:25Z
Same issue here and tried your suggestion, but does not help.
2022-09-10T18:14:31Z
I did a quick & dirty fix. The command in file user.py that doe not do its job properly is getpass()I removed the function and replaced it by setting the token = “huggingfacesuppliedtoken”This helped enough to get login successful. I do not recommend my solution - but as a quick fix it does work.getpass — Portable password input — Python 3.10.7 documentation
2022-09-12T10:43:42Z
For some reason the prompt sometimes clears the clipboard copied text.In anaconda you can paste by right-clicking in the field. Discovered this by accident.So just copy the key, right-click in the text field and press enter. The text won’t show.
2022-10-05T11:29:39Z
How do I fix this issue as I would like to be able login and use the model’s??
2022-10-07T09:27:26Z
How to login to Huggingface Hub with Access TokenBeginnersi just have to come here and say that: 

run the command prompt as admin
copy your token in
wait about 5 minutes
run huggingface-cli login
right-click the top bar of the command line window, go to “Edit”, and then Paste
it should work. IF IT DOESN’T WORK, DO IT UNTIL IT DOES.
2022-10-07T10:08:44Z
login with admin and spent 30min trying this method with no success. I give up! I really want to use AI but this Broken login method is driving me mad! sorry for my out burst. is there any other way with out using adaconda or is this bug across the board?
2022-10-08T07:48:49Z
Im having the same issue I just cant enter the token or anything
2022-10-19T23:47:18Z
that worked!!! TY
2022-10-21T19:50:02Z
Had this same problem, my clipboard was getting cleared after every attempt to login. also, i couldn’t see the text after pasting. Order of operations washuggingface-cli login(Copy token to clipboard)right click to paste (trust that it pastes, it won’t show)(hit ENTER)
2022-10-23T04:52:47Z
This worked. Thank you.
2022-12-23T17:56:52Z
yeah!! Thank you very much I was struggling at that point and now my toker is valid, have a good one
2023-01-30T10:30:45Z
You can open python in the prompt and use huggingface_hub.login
2023-02-20T00:17:10Z
python prompt is a winner…don’t forget the importimport huggingface_hub
huggingface_hub.login()
2023-03-29T15:04:30Z
I did in VSCODE. the problem is that the prompt does NOT SHOW the token.  What i did (WINDOWS):copy and paste your tokenrun the clihuggingface-cli loginclick in the blinking cursor and then select the token written before and right-clicktwice(enviroment\.conda) C:\My\project\path\> token123
>>> 'token123' is not recognized as an internal or external command,
operable program or batch file.(enviroment\.conda) C:\My\project\path\> huggingface-cli login
>>>
    _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|
    _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|
    _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|
    _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|
    _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|

    To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .
Token can be pasted using 'Right-Click'.
Token: | (blinking cursor)press ENTER and follow the instructions
No date available
No reply text available