2
2

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 5 years have passed since last update.

GitHubでinvalid username or passwordが出た場合の対処方

Last updated at Posted at 2019-11-24

パスワード変更後、Pushが失敗する場合

以下コマンドで再度設定すると上手く行く場合が多いです。

$ git config --global user.name ユーザ名

上記コマンド実行後、次のPush時にユーザ名とパスワードが聞かれますので新しいパスワードでログインをしてください。

二段階認証など何かしら設定を変えた後失敗する様になった場合

以下コマンドでhttps://github.comが表示された場合、

git remote -v

以下コマンドでgitプロトコルになる様設定を変更すると直る場合があります。

git remote set-url origin git@github.com:リポジトリ名

同様のissueはこちら。
https://stackoverflow.com/questions/29297154/github-invalid-username-or-password

他に何か思いついたら追記します。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?