15
12

More than 1 year has passed since last update.

8月13日よりgithubでパスワードでプッシュできない。

Last updated at Posted at 2021-08-15

プッシュできなくて焦りました。
どうやらトークンが必要とのこと。

% git push origin main
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.

自分の場合(mac)

*環境や今までのpush方法が異なる方もいらっしゃるかもしれないので、
実行は個人判断でお願いします。

GitHubで
Settings → Developer settings → Personal access tokens と進んで、

Generate new Tokenで新しく作成、
期限を記入して、
repoとadmin:repo_hookとdelete_repoのチェック。
画面下部のGenerateTokenで生成完了。

スクリーンショット 2021-08-15 16.34.08.png

生成したTokenをコピー。

finderでチェーンアクセスを検索
チェーンアクセスでgithub.comのを検索(種類はインターネットパスワード)
スクリーンショット 2021-08-15 16.30.08.png

パスワードを表示から、既存のパスワードを削除して、先程のトークンを記入。
スクリーンショット 2021-08-15 16.35.14.png

私の手元ではpushできました。

% git push origin main

*タイムリーな話なので、追記修正あったらご教授いただけますと幸いです。

キーチェーンがない場合(追記)

git push した時のgithubのユーザー名とパスワードで、
パスワードをさっきコピーしたtokenを入れるとOKです。

公式
https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
https://docs.github.com/ja/github/getting-started-with-github/getting-started-with-git/updating-credentials-from-the-macos-keychain
https://docs.github.com/ja/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

参考
https://zenn.dev/suzuki_hoge/articles/2021-08-github-access-f732e5b9868137

15
12
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
15
12