Github 2FA 配置

386 阅读1分钟

背景

登录 GitHub 都会看到一个要求 Enable 2FA 的重要提示,具体如下:

GitHub users are now required to enable two-factor authentication as an additional security measure. Your activity on GitHub includes you in this requirement. You will need to enable two-factor authentication on your account before Novermber 04, 2024, or be restricted from account actions.

2FA 的英文全名是 Two-factor authentication,顾名思义,2FA 是一种身份验证方法,它要求用户提供密码和另一个认证因子或者至少提供两个认证因子(代替密码),才能访问网站、应用程序或网络。主要就是破解第二个认证因子需要付出更多,并且其他类型的因子更难以窃取或伪造,因此 2FA 可提高帐户安全性,并更好地保护组织及其用户免遭未经授权的访问。

解决

  1. 下载 Authentictor。
  2. 扫描页面上的二维码即可生成一个 2FA 码。扫描完之后手机端会出现一个6位的数字,输入到github的网页中。
  3. 验证成功后,点击 Continue 按钮进入下一步,在这里你需要保存你的 recovery codes,点击 Download 下载 github-recovery-codes.txt 文件。
  4. 点击“I have saved my recovery codes”按钮,一切顺利将出现如下页面,说明 2FA 已经配置成功。