🦒

【GitHub Error】remote: Invalid username or password.

2024/09/30に公開

Error Message

remote: Invalid username or password.
fatal: Authentication failed for <repository path>

Cause

It may be expired the access token of GitHub.

Solution

  1. Check the remote URL
git remote -v
  1. Update the remote URL
git remote set-url origin https://<username>:<new_token>@github.com/<username>/<repo>.git
  1. Check the connection
git fetch

That's all.

Discussion