This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygwin git terminal won't capture password
- From: Jeremy Bopp <jeremy at bopp dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 07 Apr 2011 15:04:32 -0500
- Subject: Re: cygwin git terminal won't capture password
- References: <711906.58368.qm@web25701.mail.ukl.yahoo.com>
On 4/7/2011 14:47, Faisal Memon wrote:
> Hi,
>
> When you use git from cygwin to clone a repo which requires a password, your
> password when typed comes out as plain text, instead of being taken from your
> terminal silently (without echo). The clone thus fails.
> The same local machine, but using linux command line shows the same repo
> working; it queries for password against the terminal session properly.
<snip>
> I am using git in cygwin version 1.7.4. Cygwin is kicked off from the PuTTY
> program version 20101029
> The same machine is running linux (via Virtual Box virtualisation), git version
> 1.7.1
>
> I've seen this problem reported elsewhere (stackoverflow) but no solution.
>
> Any ideas what do to?
Instead of using PuTTY to run Cygwin, try using mintty instead. It is
available as a Cygwin package and is originally based on some fork of
PuTTY if I recall correctly. Using a standard Windows cmd terminal will
also work.
I believe the problem is that Cygwin programs, such as git, expect to
have a terminal when they prompt for passwords like that. Cygwin
programs don't understand PuTTY as a terminal though. They probably see
it as a plain pipe, so they won't try to treat it like a terminal and
will thus be unable to capture passwords like this.
You can see similar problems for native Windows programs that try to
take input in a similar manner when running in a terminal such as
mintty. Again, they see the terminal as a simple pipe, so it's
impossible to do any of the terminal magic necessary to capture the
password silently.
-Jeremy
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple