Here is what to do when you suddenly have to provide username and password when pushing to github:
git remote set-url origin email@example.com:[username]/[reponame].git
The reason is that you likely used the https URL for the github remote on your repo. This happened to me after github changed their UI and made the https URL the default. There is a button to switch it to SSH.
Link: github – Git push requires username and password – Stack Overflow via stackoverflow.com