HACKER Q&A
📣 forgotmypw17

GitHub Personal Access Tokens sometimes don't work for anyone else?


Sometimes I generate a token and use it with `git push` and it works the first time.

Other times, no matter how many times I try, it is declined.

Same process, same machine and address I'm pushing from, same permissions selected...

I try it several times in a row, and it keeps failing, giving me that "Support for password authentication was removed" message, which I'm assuming is always displayed, even when the password is incorrect.

It is driving me absolutely bonkers!

I've even recorded a video of my process and reviewed it, I can post it here if there aren't any clues otherwise.

Has anyone else experienced anything like this? It is so frustrating trying to update my repo and spending 15 minutes on this.


  👤 floxy Accepted Answer ✓
What OS? Do you always use the same terminal program when pasting the token? Always use the same method of copy/paste (middle button "selection" vs. ctrl-c/ctrl-v)? Any chance there could be some invisible whitespace getting copied? Are you using command line git or some other gui tool? Sorry for the issue, the personal access tokens have worked reliably for me fwiw (only ever used from Linux).

👤 conradludgate
I'm not sure since I don't use PAT for github auth. SSH access is pretty simple to set up and I've never had issues with it. If you can, I'd suggest you switch to it