60歳からITエンジニアを目指す無謀なブログ

60歳で定年し、職種を変更してIT技術者を目指すブログです。

GitHub push時の認証Fail解決方法

GitHubの勉強のため、コマンドラインでPushを実行したらFailしました。

>git push origin master

Username for 'https://github.com': abcd@gmail.com

Password for 'https://abcd@gmail.com@github.com': 

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/abcd/git_practice.git/'

どうやら、Git Hubに登録したパスワードでの認証では、GitHubで生成した

トークンをパスワードに入れて認証する方式に2021年8月13日から変更になったようです。

 

トークンの生成方法GitHubGUIの個人設定menuから

Settings>Developpers Settings>PersonalAcessTokens

で生成します。 有効期限を決めて、Tokenを生成した方が良いでしょう。

 

以下を入れて検索するとネットで詳しく解説してくれてる人がいます。

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.