GitHub 2FA and personal access token
Posted in :
Even since I enabled the 2 factor authentication on GitHub, I am using the developer personal access token (PAT) for pushing the code.
The normal steps (please ignore the numbers in the beginning of each line):
514 git remote remove origin 515 git remote add origin https://email@example.com/major1xu/myNestEgg.git/ 516 git remote -v 517 git push 518 git push --set-upstream origin master
This works for both the public and private repo. I’m thinking another way to do it is when using “git clone” to begin with, we use the PAT. I am going to try it next time. Note I created the repo in the GitHub website first.