Using Your YubiKey with GitHub

Applicable Products


How to Set Up Two-factor Authentication with GitHub

  1. Obtain a U2F enabled YubiKey or Security Key. Any from the Applicable Products section will work.
  2. Plug in your YubiKey to the computer.
  3. Using Google Chrome or Chromium, log in to your GitHub account.
  4. Open your Account Settings and select Security from the left column.
  5. Click Enable Two-Factor Authentication.
  6. Follow the instructions for either setting up two-factor using an authenticator app or SMS codes.
  7. Under Security Keys click Register new device.
  8. Enter a unique nickname for your security key and click Add.
  9. When the LED on your YubiKey begins flashing, tap the metal contact to confirm the registration.

That's all! Repeat steps 7-9 above for any additional YubiKeys or Security Keys you want to associate with your GitHub account. 

How to Use Two-factor Authentication with GitHub

  1. Log in with your user name and password.
  2. When prompted, insert your YubiKey and touch the blinking light. That's it!

Note: After you enable U2F on your GitHub account, you will not be able to use username and password for authentication to GitHub when using Git. You will need to add a SSH key to your account per the GitHub documentation. YubiKeys can securely hold your SSH key using the OpenPGP or PIV applications. 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.