はじめに
GitHubでPushしようとした時に以下のエラーが発生しました。
Pushing to https://github.com/Moto0124/Calculator.git
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/Moto 124/Calculator.git/': The requested URL returned error: 403}
最初はアカウントのパスワードが間違っているのかなと思っていたのですが、ログを見るとそうではなかったらしく
どうやらGitHubはGit操作の認証時にアカウントパスワードを受け付けなくなり、代わりにPAT(パーソナルアクセストークン)を使用する方法に変わりました。
解決方法としては以下のドキュメント通りに操作を行えば解決できます。