How to login to Huggingface Hub with Access Token Hugging Face users can log in to the Hugging Face Hub from the command line by running `hf auth login` and selecting "Paste an access token," then pressing Enter and confirming the account with `hf auth whoami`. If the wrong account appears, the saved token may be overridden by the `HF_TOKEN` environment variable, which takes precedence, or by a stale Hugging Face entry in `~/.netrc`; deleting `~/.netrc` and logging in again resolved the issue for one user. The guidance matters because `~/.netrc` can also hold credentials for other services, so users should check for an old Hugging Face entry before removing the file. This worked for me, thank you so much for coming here to to tell us. I had this same issue. I was using hf auth login –add-to-git-credential –token it wasn’t the paste issue for me, but rather that I still had a ~/.netrc rm ~/.netrc then tried to login again and it worked Run hf auth login and choose “Paste an access token.” If nothing shows up when you paste, that’s normal. Press Enter, then run hf auth whoami to check which account you’re logged in as. If it shows the wrong account, check whether HF TOKEN is set. It takes precedence over the saved token. If you suspect ~/.netrc , check for an old Hugging Face entry first. The file may also contain credentials for other services.