0
0

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.

Githubトークン更新後の対応方法

Posted at

対応方法をいつも忘れるのでメモ。

環境

macOS Monterey 12.3.1

エラー内容

Githubトークンの期限が切れていたのでトークンを再生成した。
その後、git pushすると認証エラーが出た。

ターミナル
$ git push origin HEAD
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/username/repository.git/'

ここでパスワードを更新する方法を調べるが良い方法が出てこない。

対処方法

再度 git pushする。
ユーザー名、パスワードを聞かれるので入力すれば更新できる。

ターミナル
$ git push origin HEAD
Username for 'https://github.com': username
Password for 'https://username@github.com':
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?