WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Github 2FA  (Read 1200 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Github 2FA
« on: August 29, 2023, 01:49:02 AM »
I got the email that I need to set up 2FA in 45 days to continue using github. I had read that Github does it right, not requiring your phone number or a smartphone, and indeed it was so.

I built a command-line totp tool:
https://github.com/fmount/c_otp

Github when setting up TOTP by default gives a QR code, but there is a link to get the actual code too. I put that to a file, say ~/.totpcodes:
Code: [Select]
github:blahblah
Now when github asks for the 2FA key, I just run "c_otp -f ~/.totpcodes" and it gives the numbers. No smartphone crap, no SMS.

I did have to correct my computer's time, TOTP fails if the time is wrong by more than 1-2min, my clock was off by 4 minutes. I also printed out the recovery codes, to have an offline copy for accessing the account if my disk fails.
The only barriers that can stop you are the ones you create yourself.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Github 2FA
« Reply #1 on: December 13, 2023, 12:03:36 PM »
@curaga, thanks a lot!