重置密码时如何获得双因素身份验证并且没有为双因素配置设备

How to get two factor authentication when resetting password and no devices configured for two factor

我最近想使用我的旧项目特定 GitHub 帐户之一,其中启用了双因素身份验证。由于我无法记住密码,因此我使用了忘记密码选项并重设密码。

但是在成功更改凭据后,GitHub 像往常一样期待双向身份验证密钥,因为我现在没有相同的设备,所以我没有将 GitHub 配置为获得双向身份验证,除了我的登录凭据外,我没有更多关于帐户的信息。

有什么方法可以使双向重构工作。或者我可以登录?

如果有GitHub账号的凭据,可以登录该账号,enable 2FA

然后您可以 generate a PAT (Personal Access Token) 以便将其用作密码(并在输入命令行时绕过 2fa 步骤)。

Personal access tokens are useful when it's too cumbersome to provide a client/secret pair for a full application, such as when authenticating to GitHub from Git using HTTPS, or within a command line utility or script.


Later I reset my password , and I was't having the device which i had configured my DuO Mobile. How could I login now. It is asking for 2FA and I don't have any way to provide the key.

那么您需要关注“Recovering your account if you lost your 2FA credentials

Having access to your recovery codes in a secure place, or establishing a secondary mobile phone number for recovery, will get you back into your account.