Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I sometimes mistype a password when being asked for it, e.g. by Git when pushing to remote repository. The password is not displayed (even masked as asterisks) in the console.

Is there a way either to correct the password, or to abort the operation? Backspace for editing and CtrlC for aborting do not seem to work.

I want to save some time instead of waiting for the remote authentication to fail, or providing a bad password, then Enter, CtrlC.

Edit 2:

Unfortunately neither CtrlU nor @ do not work for me. Any other guesses?

I used MINGW32 bash under Windows XP, but as pointed by @silencedhaven, my terminal shouldn't matter, but rather the one I'm connecting to. So I'm trying to push to GitHub by HTTPS.

share|improve this question

migrated from unix.stackexchange.com Nov 23 '12 at 19:19

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

Did is after you press enter? And do you realize that the password is wrong after pressing enter, or because the host is waiting? –  Bernhard Nov 22 '12 at 15:30
I'm aware of the typo just after pressing wrong key on the keyboard. At that time, I want to fix it, or abort, without pressing ENTER. I know I can type ENTER and CTRL-C quickly afterwards. –  jakub.g Nov 22 '12 at 15:33
Is this what you're looking for? –  Kevin Nov 22 '12 at 18:04
May depend on your terminal type, but CTRL-U often does it for me, if I understand your situation. –  Lars Rohrbach Nov 22 '12 at 18:04
Yep it's my case unfortunately. Tried CTRL with U, W and several other buttons and none of it works for me. –  jakub.g Nov 23 '12 at 13:12
add comment

3 Answers 3

CtrlU will erase from the current cursor position back to the beginning of the line, so you can then type your correct password.

share|improve this answer
Sadly, doesn't work under my terminal - MINGW32 (Git 1.7.11) @ Win XP. –  jakub.g Nov 23 '12 at 13:16
add comment

Try pressing @ (usually Shift+2). In some getty variants, it means erase to the beginning of line, basically a do-over. After pressing @, start typing your password from the beginning.

It all depends on what you are connecting to, not what you are running as a terminal emulator. For the past eight years, I am using PuTTY as my terminal emulator, and Backspace works fine if I am connecting to a RedHat Linux system to erase one character at a time, but when I am connecting to an HPUX system, I have to use @ to start over. So, you need to know how the keyboard input reading program (getty in most Unix cases) interprets the non-printable characters like, BKSP, DEL, etc.

share|improve this answer
Hi, thanks for the information. However, @ also doesn't work for me. –  jakub.g Nov 29 '12 at 16:58
what is the type of system you are trying to connect to ? do you know that ? Because, if you don't, we are chasing a red herring here. The best way to figure this out is to talk to the administrator(s) of the remote system and learn their key-press/keyboard reader executable and what it accepts as del/bksp characters –  MelBurslan Nov 29 '12 at 17:01
In my particular case, I'm trying to push to Github. No idea which Unix flavor they're using. –  jakub.g Nov 29 '12 at 17:05
since github is a commonly used platform, I'm sure you are not the only one. The problem is, here, on superuser.com, I don't believe there are too many github users. if you pose this question on one of github concentrated/targeted forums, you can get a faster answer. if you wait here long enough, the same answer will eventually come I'm sure. –  MelBurslan Nov 29 '12 at 18:45
Yep I'll try to contact Github support and write here if I solve it. –  jakub.g Nov 29 '12 at 19:03
add comment
up vote 0 down vote accepted

It seems the issue has been solved in Git 1.8. I can correct my wrongly typed password in Git @ WinXP.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.