The following recipe will assume that you have already signed up for GitHub and that you have enabled Two-factor authentication. If you have not signed up for a GitHub account, you can do so by going to https://github.com/ and creating a new account. To enable Two-factor authentication on your GitHub account (something I personally strongly advise), do the following:
- Click on the down arrow next to your profile image, and select Settings:

- From the Personal settings menu that appears on the left of the next web page, select Security:

- The first section on the security page will be your Two-factor authentication status. To get started with setting it up, click on the Set up two-factor authentication button.
- You will then be presented with a brief overview of what Two-factor authentication is and you will be given the choice of Set up using an app (which I recommend) or Set up using SMS. Using an app is by far the easiest, and if you have a smartphone or tablet, you can download an authenticator application from the applicable app store. From there on, follow the prompts that GitHub give you to complete the Two-factor authentication setup.
- After you have completed the setup, your Two-factor authentication will be switched on.
