We could encounter an “Invalid username or password” problem when we enable 2FA two-factor auth and try “git push“.
The solution is to instead of using your GitHub account password, you need to generate a secret token.
Here is the instruction from Github: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
Finally, you should do is:
$ git clone https://github.com/username/repo.git Username: your_username Password: your_token