Initiating a push or any other action with GitHub from the command line (over https, not ssh) that calls for the username and password not only fails but, when it does, it r
Same thing happened with me, when i have enabled 2-way authentication for github. Things i did to resolve:
Doing this will solve your issue.
Just incase this helps anyone else also, I was signed into the mac app, command line working fine, but because I then turned on 2FA, my commands were returning the error. I had to sign out of the app, then I could use my Personal access token in my commands as per ele's answer here.
Hopefully that helps someone!