git command-line multi-factor authentication

885 views Asked by At

I have set up my github account to use a hardware device for multi-factor authentication. However, I just ran git push from the command line and it asked for a username/password. I provided same. SEVERAL TIMES. I had to get it right at least once. Every time, no joy. Is there something I'm missing?

1

There are 1 answers

0
StevePoling On

Stupid me. Read the fine manual. I quote

"You can create a personal access token and use it in place of a password when performing Git operations over HTTPS with Git on the command line or the API.

"A personal access token is required to authenticate to GitHub in the following situations:

"When you're using two-factor authentication..."

Apologies for hurting the signal-to-noise ratio.