two-factor authentication (2FA)
GitHub要求用户使用双重认证,即2FA认证。
2FA认证有两种方式:
1、采用具备2FA认证的软件,例如官方推荐的1Password、Authy和Microsoft Authenticator;
2. Authenticator也可以用其他工具实现,工具多了去了,阿里的,赛门铁克的,Github的
3、使用SMS短信认证,似乎国内的手机号并不支持。
本篇博文,简单讲解如何使用手机下载Microsoft Authenticator配置Gityhub的2FA双重认证
step 1:login github first
Device verification
Email
We just sent your authentication code via email to y********@youdomain.com. The code will expire at 12:49AM CST.
Device Verification Code
input from your email
authentication code:558899
step 2:
second login
choice forgot user password
display authentication code
step 3.use Authenticator Pro - Free and open-source two-factor authentication
https://www.iaspnetcore.com/blogpost-656ab4dc92f1cd0292988624-authenticator-pro-free-and-open-source-two-factor-authentication
Two-factor methods
you can choose one of the following options:
Security key
GitHub Mobile
Authenticator application (TOTP)
Text messages (SMS)
way 1:在GitHub上绑定手机号码
https://blog.csdn.net/y1534414425/article/details/110507278
way 2:Authenticator app
You can use recovery codes as a second factor to authenticate in case you lose access to your device. We recommend saving them with a secure password manager such as 1Password, Authy, or Keeper.
1password 是收费软件,
Authy 免费版功能有限
Microsoft Authenticator:用 Authenticator 扫一下二维码就行,https://blog.csdn.net/KRISNAT/article/details/140762848
Authenticator Pro - Free and open-source two-factor authentication https://www.iaspnetcore.com/blogpost-656ab4dc92f1cd0292988624-authenticator-pro-free-and-open-source-two-factor-authentication
https://blog.csdn.net/freewzx2005/article/details/133956893
Microsoft Authenticator
选择微软的 Authenticator,HW手机已经不能通过应用商店或者扫描下载该应用,目前还可以在 百度手机助手 下载。
三星手机商店可以下载
Microsoft Authenticator 是一个兼容性很强的 2FA 应用 app,如果能够安装它,可以解决绝大部分的 2FA 验证问题。
但是,在国内如果你用苹果手机还好,如果是用安卓(Android)手机,因为没有 Google Play Store,而 Microsoft Authenticator 又不上架国内的应用商店,是没有办法安装的。在很长一段时间里,我不得不用我的一台旧苹果手机作为 2FA 专用机,有时候忘记充电了,还很长时间无法登陆。
现在找到在安卓(Android)上安装 Microsoft Authenticator 的方法,在此记录下来。
首先访问:https://apkpure.com/microsoft-authenticator/com.azure.authenticator,然后「下载 apk」,再想办法传到手机上(能手机直接下载就更妙了)进行安装。
detail:下载 Microsoft Authenticator
https://www.microsoft.com/zh-cn/security/mobile-authenticator-app
keeper
当你无法进行两步认证时,你有如下几种方法来登录github
recovery-code
github设置了两步认证以后有一个recovery-code要你下载,并且会在邮件里面通知你,这时你最好是下载下来保存好。在github 2FA的说明里面解释说这是在丢失两步认证后能登录帐号的唯一方式。的确是这样,在两步认证没办法进行下去时,你可以输入你的recovery-code来登录github。如果你没有下载下来,那么往下
手机认证身份
国内没法绑定手机号
所以,github 2FA里的recovery code,一定要好好保存
source:
https://blog.94xychen.net/posts/github-2fa/
https://blog.csdn.net/i042416/article/details/109515200
Add a passkey
国外的2FA也大都支持短信验证码,只不过不支持我们的号码而已。
我是华为手机,我的选择是在电脑上安装2FA应用。像Github的2FA验证我同时还在手机上安装了一个Github应用。