Diary

Diary

日々学んだことをアウトプットする場として初めてみました

【macOS】 Support for password authentication

macgithub の操作をしていた際、以下のようなエラーが出ました。

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/xxx/aaa.git'

パスワード認証ではなく Access Token を使ってね

という内容のエラーになります。

調べると解決策は簡単に出てきますが、自分の場合なかなか解決しなかったので、最終的に解決した方法についてメモしておきたいと思います。

  1. Access Token を発行
  2. Keychain Access から、github.com の内容を削除
  3. ターミナルから git clone, ghq get などした際に聞かれる username, pw に以下を入力
    • username: github のアカウント名
    • password: 1 で発行した Access Token

特に 2 で一旦削除する作業が必要でした。