This fixed the issue for me:
- Open
Keychain Access - Select
Keychains -> loginandCategory -> Passwords - Type
github.comin search box, you should see an entry (or entries) ofInternet Passwordkind forgithub.com. Right click & Delete them. - Go back to terminal and retry the git command that requires the password
- Type in your git username and password when prompted
- Done 🙂