I turned on Github two-factor authentication as Github urges anyone who uses their service. Next day, when I wanted to commit some changes, Visual Studio asked my Github credentials again. I entered; it didn't seem like it. Entered two more times while I was sure I was typing correct credentials. After my third try, I received an error in Visual Studio: "An error occurred. Detailed message: Response status code does not indicate success: 401 (Authorization Required)"

Caps on? No! Typo? No! Then what?

I started to thinking Visual Studio 2013 Git Tools doesn't support two-factor login. I didn't see any field where I can enter my authentication code.

After I searched in inside the Github, realized that when I turned on 2FA, then I should login via an authentication token; not the credentials!

I went to Personal access tokens settings in Github then generated a new token. I saved somewhere safe! Then went back to Visual Studio Team Explorer window and clicked sync button again. It popped up credentials screen again, I entered my email address for username and the newly generated token to the password field. Sure enough, I successfully synced my code with Github again!