Using YubiKey with GitHub

How to set up a YubiKey with GitHub?

With hardware security keys, you can get the additional protection of two-factor authentication to make your login procedure secure. Follow these step-by-step instructions to easily set up a U2F security key to work with GitHub accounts.

Requirements

If your GitHub account doesn’t already have two-factor authentication enabled, follow the steps in Step 1 to enable this option. If two-step verification is already enabled, continue with Step 2.

Step 1: Enabling two-factor authentication

  1. Sign in to your GitHub account.
  2. Click your profile picture in the top right of the screen.
  3. Select Settings
  4. In the left pane select Security.
  5. Click Enable two-factor authentication.
  6. Select a method for obtaining one-time passwords: Set up by using an app (Setting up sign-in using the app) or Set up using SMS (SMS login setup).

Set up by using an app

To get started, you should install the application for receiving one-time passwords. We recommend using TOTP apps such as:

When the mobile app is already installed:

  1. Click Set up using an app
  2. Save your recovery codes.
    • To save the recovery codes on your computer, click Download
    • To print the recovery codes on paper, click Print.
    • To copy the recovery codes to the clipboard, click Copy.
  3. After saving your recovery codes, click Next
  4. On the Two-factor authentication page, do one of the following:
    1. Scan the QR code with your mobile device’s app. After scanning, the app displays a six-digit code that you can enter on GitHub.
    2. If you can’t scan the QR code, click enter this text code,to see a code you can copy and manually enter on GitHub instead. If you’re using Microsoft Authenticator, you’ll need to use this method.
  5. The TOTP mobile application saves your GitHub account and generates a new authentication code every few seconds. On GitHub — on the two-factor authentication page — enter the code from the application and click Enable.
  6. After you’ve saved your backup codes and enabled two-factor authentication, it’s a good idea to sign out and sign in again. In case of problems, such as a forgotten password or a typo in the specified email address, you can use the backup codes to access your account and troubleshoot.

SMS login setup

If you are unable to use the mobile TOTP app, you can receive one-time passwords via SMS. You can also provide a second phone number for a fallback login method.

Before using this method, make sure that you have the ability to receive SMS messages. You may also be charged for incoming messages.

  1. Click Set up using SMS.
  2. Save your recovery codes
    • To save the recovery codes on your computer, click Download.
    • To print the recovery codes on paper, click Print.
    • To copy the recovery codes to the clipboard, click Copy.
  3. After you have saved your spare codes, click Next.
  4. Select a country code and enter your phone number. When your information is correct, click Send authentication code.
  5. You should receive an SMS with a code. Type the code on the Two-factor authentication page, and click Enable.
  6. After you’ve saved your backup codes and enabled two-factor authentication, it’s a good idea to sign out and sign in again. In case of problems, such as a forgotten password or typo in your email address, you can use recovery codes to access your account and correct the problem.

Step 2: Adding a YubiKey for two-factor authentication

Once two-factor authentication is set up via mobile app or SMS, you can add the YubiKey hardware security key as a second factor of authentication on GitHub.

  1. Sign in to your GitHub account.
  2. Click your profile picture in the top right of the screen.
  3. Select Settings.
  4. In the left pane select Security.
  5. To the right of Security keys click Add.
  6. Insert your YubiKey into a USB port.
  7. In chapter Security keys click Register new device.
  8. Type a nickname for your YubiKey, then click Add.
  9. Wait your YubiKey to begin flashing, then tap the gold button or edge.

That’s all! You have now added a Security Key by Yubico to your GitHub account. Now you can easily log into your GitHub account, securely protected by two-factor authentication. All that is required to login is to enter your username and password, then touch the button or the gold-colored edge on your YubiKey.

What browsers versions support using YubiKey?

  • Google Chrome: since version 38.
  • Mozilla Firefox: since version 60.
  • Opera: since version 40.
  • Microsoft Edge: since build 17723.

* It is recommended to use the latest browser version.

OTP passwords on YubiKey — how it works

OTP passwords are one-time passwords (the origin of OTP is from English one time password) that are used for one authentication session. Their effect is usually limited by time. You may have received such codes by phone or mail when trying to access online banking or...

How to protect yourself from phishing with YubiKey on Binance

Binance is one of the largest and most popular cryptocurrency exchanges in the world. With its help, you can monitor the movements of the cryptocurrency market, invest in digital assets and conduct trading operations in real time. Of course, in order to use the...

Yubico Authenticator – User Guide

This guide is designed to help you set up your YubiKeys on any services that offer two-factor authentication connections using authenticator programs that generate codes.

How to set up a YubiKey in Linux using call-response

YubiKey hardware security keys make your system more secure. And the procedure of logging into accounts is faster and more convenient. Follow the instructions below to easily add the required settings on your Linux system.Setting up the YubiKey in Linux is quite...

5 ways to install Yubico software on Linux

To use YubiKeys on a Linux system, you will need to install the appropriate Yubico software: Yubico authenticator; YubiKey Manager; Built-in repositories; Yubico PPA packages; Compilation from the source code. Installing the Yubico Authenticator There are several ways...

How to add a spare YubiKey security key and why to do it

How to add a spare YubiKey security key and why to do it How to add a spare YubiKey security key and why to do it   YubiKey hardware security key very reliable – it is resistant to wear and tear and does not lose its properties when exposed to water. But it has a...

How to configure YubiKey on Linux using U2F function

With the help of YubiKey hardware security keys, your system receives an increased level of protection, and the process of logging into accounts becomes faster and more convenient. To easily configure the necessary parameters on a Linux system, you should follow the...

Using YubiKey with Google Accounts

How to set up YubiKey with Google AccountHow to set up a YubiKey to protect Google Accounts? With hardware security keys, you can get the additional protection of two-factor authentication to make your login procedure secure. Follow these step-by-step instructions to...

How to set up a YubiKey with a Dropbox account

How to set up a YubiKey with a Dropbox accountHow to set up a YubiKey with a Dropbox account? With hardware security keys, you can get the additional protection of two-factor authentication to make your login procedure secure. Follow these step-by-step instructions to...

Using your YubiKey with Facebook

Using your YubiKey with FacebookWith hardware security keys, you can get the additional protection of two-factor authentication to make your login procedure secure. Follow these step-by-step instructions to easily set up a U2F security key to work with your Facebook...