github 2fa中國認證及TOTP App

Because of your contributions on GitHub, two-factor authentication will be required for your account starting Sep 28, 2023. Thank you for helping keep the ecosystem safe! Learn more about our two-factor authentication initiative.

2FA

對github有代碼貢獻的帳號要求進行2FA驗證, 否則過期不能提交代碼。

但是github手機短信驗證不支持中國號碼,這裏介紹2種我正在使用的方式:

  1. totp應用
  2. 瀏覽器擴展

啓用2FA之後,每次在不同設備上登錄github都要輸入驗證碼,瀏覽器插件可以生成驗證碼,但前提是需要先把帳號添加擴展中,換設備登錄建議在手機上安裝totp應用


TOTP應用

推薦微軟的authenticator,類似網易大神APP,每次打開都會生成一個動態驗證碼,用此驗證碼進行登錄,在國內的應用商店中可以下載到或者從google play中下載。

  1. 打開GitHub,從右上角選擇【設置】,或者點擊https://github.com/settings/security
  2. “個人設置”中選擇【password and authentication】,然後從【Two-factor authentication】區域中選擇 “Authenticator app”。
  3. 選擇Edit,就會打開一個 頁面顯示 QR 代碼, 請勿關閉此頁面。
  4. 打開Authenticator應用,從右上角的【+】號添加帳戶, (Google、Facebook 等) 選擇其他帳戶,然後掃一掃github頁面上的這個QR碼
  5. 掃描完成之後帳號就添加到Authenticator中了,下次打開切到github即可展示動態驗證碼。

image-20230916145641319


如果是第一次啓用2FA,可以查看微軟的文檔:Add non-Microsoft accounts to the Microsoft Authenticator app - Microsoft Support

在第一次啓用2FA後會給你一串碼,下載下來保存這串碼,關於這種恢復碼的解釋如下:

Recovery codes can be used to access your account in the event you lose access to your device and cannot receive two-factor authentication codes.


瀏覽器擴展

開源免費的Authenticator: 2FA Client,支持多種瀏覽器。

切到github的設置- 安全頁面,展示一個二維碼,然後點擊擴展上的掃描按鈕,用鼠標選中github的二維碼,即可添加github帳號。

開源地址:Authenticator-Extension/Authenticator: Authenticator generates 2-Step Verification codes in your browser. (github.com)

Edge擴展:Authenticator: 2FA Client - Microsoft Edge Addons

Chrome擴展:身份驗證器 - Chrome 應用商店 (google.com)

image-20230916145046542


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章