13
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

fatal: Authentication failed for 'https://github.com/...'の対処法

Posted at

初めに

git push を行ったら、以下のエラーに遭遇したので対処法を記載します。
fatal: Authentication failed for 'https://github.com/...'

実際のエラー文

git push -u origin main
Username for 'https://github.com': username
Password for 'https://xxxxxx@github.com': password
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/xxxxxxx'

push後、UsernameとPasswordが聞かれます
原因は、Passwordにありました。

対処法

Personal access tokensを作成し、Passwordに入力
以下のリンクから作成できます

Personal access tokens

Password for 'https://xxxxxx@github.com': ここに作成したトークン

まとめ

Passwordと聞かれたらログインパスワードを記入すると思いきや、アクセストークンを記載する必要があります。 Passwordじゃなくて、Access Tokenに変更してほしいですね。
13
8
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
13
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?