如何为 GitHub 开启两步验证
两步验证能在密码泄露时依然保护你的 GitHub 仓库与组织安全。GitHub 强烈建议所有开发者开启两步验证。
- 登录 GitHub,点击头像选择Settings。
- 在侧边栏选择Password and authentication。
- 在Two-factor authentication下点击Enable two-factor authentication。
- GitHub 会显示二维码,用 Authenticator App 扫描。
- 输入应用中的 6 位验证码完成校验。
- 下载并妥善保存恢复码(recovery codes),然后点击Done。
提示:恢复码是设备丢失后找回 GitHub 账户最快的方式——请保存到密码管理器或离线介质中。