Two-factor Authentication (2FA)

Two-factor Authentication (2FA)
使用方式3种:
1.Generating a code through a TOTP application
2.Using a FIDO U2F security key
3.Receiving a text message

https://help.github.com/articles/providing-your-2fa-authentication-code

Two-factor Authentication (2FA) / Providing your 2FA authentication code

Providing your 2FA authentication code

With 2FA enabled, you‘ll be asked to provide your 2FA authentication code, as well as your password, whenever you access GitHub.

Depending on how you configured two-factor authentication, your authentication code will either be generated by an application or delivered to your phone via text message. You can choose to switch between delivery methods at any time.

GitHub will only ask you to provide your 2FA authentication code again if you‘ve logged out, are using a new device, or your session expires.

If your authentication fails several times, you may wish to synchronize your phone‘s clock with your mobile provider. Often, this involves checking the "Set automatically" option on your phone‘s clock, rather than providing your own time zone.

Generating a code through a TOTP application

If you chose to set up two-factor authentication using a TOTP application on your smartphone, you can generate an authentication code for GitHub at any time. After entering your username and password, you‘ll be asked for your "Two-factor authentication code". In most cases, just launching the application will generate a new code. You should refer to your application‘s documentation for specific instructions. You can then enter this code to gain access to your account.

If you delete the mobile application after configuring two-factor authentication, you‘ll need to provide your recovery code to get access to your account.

Using a FIDO U2F security key]

Note: FIDO U2F authentication is currently only available for the Chrome browser.

If you set up two-factor authentication via a security key, you can use it to authenticate against GitHub instead of using codes generated by your phone. In most cases, you generate a code by touching the security key when it‘s plugged into your computer, but you should refer to the documentation for your device for specific instructions.

Authentication with a security key is secondary to authentication with your phone. You‘ll still need to set up 2FA using a TOTP application or a text message before being able to enable a security key. If you lose your hardware key, you‘ll still be able to use your phone‘s code to sign in.

Receiving a text message

If you set up two-factor authentication via text messages, GitHub will send you a text message with your authentication code. After entering your username and password, you‘ll be asked for your "Two-factor authentication code." This will automatically be delivered to your phone via text message. You can then enter this code to gain access to your account.

When You‘ll Be Asked

There are several scenarios where you‘ll be asked to provide your 2FA code:

Through the web

If you sign into GitHub through the website, you‘ll be provided with the following prompt asking for your 2FA code:

If you‘re providing a recovery code you previously downloaded from GitHub, you will need to click the Enter a two-factor recovery code link and follow the instructions for entering your recovery code instead of entering it in the Authentication Code box.

Through the API

With 2FA enabled, you‘ll need to pass along a special header containing your 2FA authentication code. More information can be found within our Developer Documentation.

Through GitHub Desktop

After setting up 2FA and reauthenticating to GitHub, you‘ll be provided with the following prompt asking for your 2FA code:

Depending on how you set up your account, you‘ll be presented with a dialog asking you to enter your 2FA code. If you set up 2FA through SMS, we‘ll text it to you. Otherwise, you can generate one from your TOTP application.

Through the command-line

Instead of entering your password for HTTPS Git, you must provide a personal access token.

2FA and Subversion (svn command line, tortoise svn, etc)

When you access a repository via Subversion, you must provide a personal access token instead of entering your password.


时间: 2024-10-09 19:48:49

Two-factor Authentication (2FA)的相关文章

odoo12之应用:一、双因子验证(Two-factor authentication, 2FA)(HOTP,TOTP)附源码

前言 双因子认证:双因子认证(2FA)是指结合密码以及实物(信用卡.SMS手机.令牌或指纹等生物标志)两种条件对用户进行认证的方法.--百度百科 跟我一样"老"的网瘾少年想必一定见过买点卡后上面送的密保(类似但不完全一样),还有"将军令",以及网银的网盾,是一种二次验证的机制:它通常是6位的数字,每次使用后(HOTP)或者一定时间后(TOTP)都将会刷新,大大加大了用户的安全性,OTP(One-Time Password)分为HOTP(HMAC-based One-

域攻击策略

https://adsecurity.org/?p=2362 Attack Methods for Gaining Domain Admin Rights in Active Directory ActiveDirectorySecurity, Microsoft Security, Technical Reference by Sean Metcalf There are many ways an attacker can gain Domain Admin rights in Active

The YubiKey -- HOW IT WORKS

A single YubiKey has multiple functions for protecting access to your email, your apps and your physical spaces. Use one or more Yubikey features, or use them all. The versatile YubiKey does not require software installation or a battery; just plug i

定制Asp.NET 5 MVC内建身份验证机制 - 基于自建SQL Server用户/角色数据表的表单身份验证

背景 在需要进行表单认证的Asp.NET 5 MVC项目被创建后,往往需要根据项目的实际需求做一系列的工作对MVC 5内建的身份验证机制(Asp.NET Identity)进行扩展和定制: Asp.NET内建的身份验证机制会使用Local DB(本地数据库)读写用户相关的信息,而在数据库驱动的项目中,管理业务信息的数据库通常是特定的数据库环境,比如远程SQL Server数据库实例或Access数据库等等,业务数据库中保存着一系列针对业务需求的数据表,因此需要定制MVC 5内建身份验证,使其操作

Configuring Autofac to work with the ASP.NET Identity Framework in MVC 5

https://developingsoftware.com/configuring-autofac-to-work-with-the-aspnet-identity-framework-in-mvc-5 Configuring Autofac to work with the ASP.NET Identity Framework in MVC 5 By Tony Mackay  02 February 2015 This post will show you how to modify the

【转】关于Git Credential Manager for Windows

今天在刚重装好的win8上首次使用Git,发现通过https引入的github库,push时只输入了一次用户名和密码,再push时已经不必输入:更奇怪的是,换了一个库竟然也不必再输入! 查了一下 $ git config --list 发现 credential.helper=manager 于是又 google 了一下,发现了这个集成在了 mingw64 中的开源工具,微软的 Git Credential Manager. 下面是一篇写得不错的博客,转自: 这里 介紹好用工具:Git Cred

AspNet Identity and IoC Container Registration

https://github.com/trailmax/IoCIdentitySample TL;DR: Registration code for Autofac, for SimpleInjector, for Unity. Tony Mackay has an alternative walk-through of a very similar process but with Autofac Part 2: Sending Emails in Asp.Net Identity using

gitlab的root用户双认证问题

突然用的好好的gitlab版本控制程序报双认证的问题,而且还是root用户,其他用户正常. 用root登录后就是一个报警界面,只有account和application两个目录能用,其他都不能正常显示,提示需要双因素认证 Two-Factor Authentication(2FA). 1.查了很多资料,都说需要手机下载google-authencator application或者 app store,扫描登录界面二维码不成功,填充app产生的六位PIN code也无效. 2.只有想办法将其功能

google authenticator 谷歌身份验证器

How to add extra security to your MVC web application, using two factor authentication. Download source code - 2.8 MB What is Two Factor Authentication? Two Factor Authentication is a way to authenticate users using two of the three valid authenticat