Re: StandardInput Not Continuing Process

Previous thread: cherry-pick / pre-commit hook? by Dave Abrahams on Wednesday, December 8, 2010 - 10:10 am. (11 messages)

Next thread: Push to all repositories by Kevin Sheedy on Wednesday, December 8, 2010 - 10:39 am. (9 messages)
From: Chase Brammer
Date: Wednesday, December 8, 2010 - 10:25 am

I am try to directly interact with Git by using only stdin, stdout,
and stderr.  So
not going through a terminal at all, but calling Git directly.   I am
having an issue
with being able to continue a process that requires input.

For example, doing a clone from a HTTPS server may require a username/password.
I writing the password as utf, and also tried just UTF byes (ie no
prepended 16-bit int)
but am unable to get the process to continue and start the clone process.

Is there some signal, or trick to getting the process to continue?  I
thought that sending a
"\n" would work, but that doesn't seem to be working either.

Thanks for any help!

Chase
--

From: Chase Brammer
Date: Thursday, December 23, 2010 - 9:55 am

Bump, any ideas?

Chase


--

From: Junio C Hamano
Date: Thursday, December 23, 2010 - 10:20 am

Certain things do want a real user sitting at the terminal (or GUI) even
when the standard streams are connected elsewhere, and password input
is one of the obvious things that would explicitly want to read from the
tty.

Perhaps driving whatever script you are writing via "expect" would work?
--

From: Brian Gernhardt
Date: Thursday, December 23, 2010 - 10:18 am

Depending on what language you're using and your pipe settings, you might need to issue an fflush(git_stdin).

~~ Brian

--

From: Tay Ray Chuan
Date: Friday, December 24, 2010 - 7:45 pm

Try putting the username and password in ~/.netrc, or in the url with
https://user:pwd@foo.com/ - that way, you can skip the "input process"
altogether.

-- 
Cheers,
Ray Chuan
--

Previous thread: cherry-pick / pre-commit hook? by Dave Abrahams on Wednesday, December 8, 2010 - 10:10 am. (11 messages)

Next thread: Push to all repositories by Kevin Sheedy on Wednesday, December 8, 2010 - 10:39 am. (9 messages)