gitrepository

Git: Entering Password in Terminal Doesn't Work?


I'm trying to push my newly committed project to GitHub via the terminal. For authentication, I enter my username just fine, but then it appears to freeze when I need to enter my password. I cant enter text or move the cursor. Hitting enter gives "Invalid username or password." because I didn't enter a password. Does anyone know what is going on here?

Screen shot of problem


Solution

  • In the shell (or the Terminal app in your case), when a program asks for a password (like git in this case), it never actually shows your password or shows you typing your password for security reasons (that way no one can see your password who's looking at your screen for example).

    After entering your username, type your password (again the cursor won't move) then hit enter. If you entered the right password, then it will push to your remote on GitHub.