【git】AWSでgit pullしたらエラーが発生した。remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

git


エラー内容としては、gitはユーザーIDとパスワードの認証辞めたから、token使ってください。と言う話です。
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

結構前に解決したのですが、忘却ログを残していなかったのとtokenの期限切れを起こすと再度設定する必要があるので、blogに残します。

下記の公式に書いてある通りでできるのですが、僕みたいに三行で説明してほしい人の為に要約を書きます。

https://docs.github.com/ja/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

①gitのDevelopper SettingからPersonal accesso tokensを発行します。
作成の時の設定ですが、pullをする場合は下記のreadのみでよいでしょう。

作成するとpersonal access tokenが発行されます。

②今まではログインする時にIDとパスワードを使ってログインしていたと思いますが、
このパスワードの部分にpersonal access tokenを入れればつかえます。