Git Clone from GitHub over https with two-factor authentication Git Clone from GitHub over https with two-factor authentication git git

Git Clone from GitHub over https with two-factor authentication


Find out how to fix this here:

https://github.com/blog/1614-two-factor-authentication#how-does-it-work-for-command-line-git

How does it work for command-line Git?

If you are using SSH for Git authentication, rest easy: you don't need to do anything. If you are using HTTPS Git, instead of entering your password, enter a personal access token. These can be created by going to your personal access tokens page.


As per @Nitsew's answer, Create your personal access token and use your token as your username and enter with blank password.

Later you won't need any credentials to access all your private repo(s).

Updates 2021: (It worked for my M1 Mac)

Create new Personal Access Tokens (Tick the appropriate boxes to grant permissions).Use GitHub username and password as your Personal Access Tokens

enter image description here


To everyone struggling, what worked for me was creating personal access token and then using it as a username AND password (in the prompt that opened).