Search code examples
githubrepositorygit-push

Git push -u origin master error wrong username or password


I'm trying to do git push -u origin master but I'm getting error invalid username or password but I'm entering the correct username and password and I've tried over 10 time and have even typed in slowly.


Solution

  • Check if:

    • the URL is an HTTPS one (git remote -v)
    • if you have 2FA in place

    If both conditions are true, you might need to create a personal access token, to be used in place of your account password.