0
0

More than 3 years have passed since last update.

gitコマンドを2要素認証に対応させるメモ

Last updated at Posted at 2020-11-21
  1. gitに関する認証情報の保存先を確認する。

    • Windows環境

      $ git config --global credential.helper
      manager
      
  2. managerの場合、GCM(Git Credential Manager)に保存される。

  3. GCMからgithub.comに関する認証情報を取得する。

    $ git credential-manager get
    protocol=https[Enter]
    host=github.com[Enter]
    [Enter]
    
    protocol=https
    host=github.com
    path=
    username=foobar@example.com
    password=********
    
  4. GCMからgithub.comに関する認証情報を削除する。

    $ git credential-manager erase
    protocol=https[Enter]
    host=github.com[Enter]
    [Enter]
    
  5. git cloneコマンドを実行する。

  6. GCMの認証画面が表示される。

  7. 新たに、github.comの認証情報をキャッシュする。

  8. パスワードにアクセストークンを指定する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0