Is there a way to correct wrongly typed password / abort the operation while on password prompt in the console in MINGW32?

2

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.

jakub.g

Posted 2012-11-22T15:01:05.387

Reputation: 4 332

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 – 2012-11-22T15:30:04.787

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 – 2012-11-22T15:33:07.167

1

Is this what you're looking for?

– Kevin – 2012-11-22T18:04:16.700

1May depend on your terminal type, but CTRL-U often does it for me, if I understand your situation. – Lars Rohrbach – 2012-11-22T18:04:39.397

Yep it's my case unfortunately. Tried CTRL with U, W and several other buttons and none of it works for me. – jakub.g – 2012-11-23T13:12:54.813

Answers

0

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

jakub.g

Posted 2012-11-22T15:01:05.387

Reputation: 4 332

3

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

glenn jackman

Posted 2012-11-22T15:01:05.387

Reputation: 18 546

Sadly, doesn't work under my terminal - MINGW32 (Git 1.7.11) @ Win XP. – jakub.g – 2012-11-23T13:16:40.813

0

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.

MelBurslan

Posted 2012-11-22T15:01:05.387

Reputation: 835

Hi, thanks for the information. However, @ also doesn't work for me. – jakub.g – 2012-11-29T16:58:11.450

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 – 2012-11-29T17:01:16.857

In my particular case, I'm trying to push to Github. No idea which Unix flavor they're using. – jakub.g – 2012-11-29T17:05:26.290

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 – 2012-11-29T18:45:58.617

Yep I'll try to contact Github support and write here if I solve it. – jakub.g – 2012-11-29T19:03:25.197