This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin git terminal won't capture password

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.


> 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.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]