Git push “fatal: Authentication failed ”

Git pushed “Fatal: Authentication failed”
Question why
You set up two-step validation earlier

 If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.

The solution
Update the branch

git remote -v 
git remote remove origin 
git remote add origin [email protected]:user/repo.git  

## Resources
[1].Git push results in “Authentication Failed”

Reproduced in: https://www.cnblogs.com/OneFri/p/11123584.html

Read More: