I set up 2 Factor Authentication on GitHub a while back. So, once I was working in the command line and wanted to push to my repo. I entered my username and password but it failed by giving an error like this
USERNAME@MYCOMPUTER:~/MyRepo$ git push
Username for 'https://github.com': GitHubUsername
Password for 'https://[email protected]': GitHubPassword
remote: Invalid username or password.
fatal: Authentication failed for '
https://github.com/GitHubUsername/MyRepo/'
So, I read this post and got the solution that I have to generate a Personal Access Token to push anything. Fine, but I think this is a little tough process because First I can't remember that massive Token and Second Storing an access key in a text file is not a safe thing to do.
So, it'll be very nice if someone can give an easy solution to push to my repo without disabling 2FA. - Thanks!