HOW TO SET UP 2FA ON GITHUB AND WHY IT'S IMPORTANT FOR YOUR SECURITY
Tags: github, 2fa, security
Published: 2023-09-01 04:38:48

If you use GitHub to store, manage, or collaborate on code, you probably want to keep your account and repositories safe from unauthorized access. One of the best ways to do that is to enable two-factor authentication (2FA) on your GitHub account.

> How to set up 2FA on GitHub and why it's important for your security



## Two-factor authentication (2FA)
 is a security feature that adds an extra layer of protection to your online accounts. It requires you to provide two pieces of information when you sign in: something you know (your password) and something you have (your phone, a security key, or a passkey). This way, even if someone steals or guesses your password, they won't be able to access your account without the second factor.

GitHub supports several methods of 2FA, such as using a time-based one-time password (TOTP) app, receiving a text message, tapping a notification in GitHub Mobile, or using a security key. You can choose the one that suits your needs and preferences. You can also add multiple methods as backup options in case you lose access to one of them.


 

To enable 2FA on GitHub, you need to follow these steps:

•  Log in to your GitHub account and go to Settings.
How to set up 2FA on GitHub and why it's important for your security


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98r4uvt7itmfo2ewwh83.png)
•  Under Access, select Password and authentication.
How to set up 2FA on GitHub and why it's important for your security -  Webzone Tech Tips - Zidane


•  Click the green button that says "Enable two-factor authentication".



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4vdap0x727asemee8s2.png)
•  Choose the method of 2FA you want to use and follow the instructions on the screen.
 - On this step you can choose Mobile Verification or Choose Authentication app via microsoft authenticator (just simple add account and scan the QR code on github above screen)

•  Save your recovery codes in a safe place. You'll need them if you lose access to your 2FA method or device.



How to set up 2FA on GitHub and why it's important for your security



After you enable 2FA, you'll need to provide your second factor every time you sign in to GitHub through your browser. You'll also need to use a token, application, or SSH key when accessing GitHub through other methods, such as the API or the command line.

Enabling 2FA on GitHub has many benefits for your security and privacy. It can help you:

•  Protect your account from hackers who may try to steal your password or personal information.

•  Prevent unauthorized changes to your code or repositories.

•  Avoid losing access to your account if someone tries to reset your password.

•  Comply with the security policies of organizations that require 2FA for their members.

By enabling 2FA on GitHub, you can enjoy coding with peace of mind, knowing that your account and code are well protected.

More security tips you can view more [here](https://learn-tech-tips.blogspot.com/search?q=security)

Thank you for reading this post. I hope you found it helpful and easy to follow. If you have any feedback or questions about How to set up 2FA on GitHub and why it's important for your security , please share them in the comments below. I would love to hear from you and discuss this topic further
✋✋✋✋  Webzone Tech Tips, all things Tech Tips for web development  - I am Zidane, See you next time soon ✋✋✋✋