Search code examples
gitgithubtwo-factor-authentication

My GitHub account is set up with 2 factor authentication, yet username/password aren't requested when cloning a repository


My GitHub account is set up with 2 factor authentication

2 factor authentication enabled

No personal access tokens are listed

Empty list of personal access tokens

And yet I am able to clone a repository without being asked for a username or password.

enter image description here

How come?


Solution

  • In github all your projects are public unless you pay for private repo.
    Anyone with github account can clone your projects.

    The 2 way authentication is for protecting your account not your projects since they are all public.

    If you want private repositories use bitbucket. You can have private repositories there.


    https://help.github.com/articles/about-two-factor-authentication/

    After 2FA is enabled, GitHub generates an authentication code any time someone attempts to sign into your GitHub account.

    The only way someone can sign into your account is if they know both your password and have access to the authentication code on your phone.