# StandardInput Not Continuing Process

5 messages from 2010-12-08 to 2010-12-25. Participants: Chase Brammer, Junio C Hamano, Brian Gernhardt, Tay Ray Chuan.
Thread: https://gitlist.dev/t/25996

## Chase Brammer, 2010-12-08 17:25

Subject: StandardInput Not Continuing Process
Message-ID: <AANLkTikBdOLjzJxikXCwTs52RByfNZzKamK+F-JhY0mQ@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikBdOLjzJxikXCwTs52RByfNZzKamK%2BF-JhY0mQ%40mail.gmail.com

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

```

## Chase Brammer, 2010-12-23 16:55

Subject: Re: StandardInput Not Continuing Process
Message-ID: <AANLkTikvrDWYT8h_MCESd9sg4_8ykSOq3XFEsoNsYDuZ@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikvrDWYT8h_MCESd9sg4_8ykSOq3XFEsoNsYDuZ%40mail.gmail.com
In-Reply-To: <AANLkTikBdOLjzJxikXCwTs52RByfNZzKamK+F-JhY0mQ@mail.gmail.com>

```
Bump, any ideas?

Chase


On Wed, Dec 8, 2010 at 10:25 AM, Chase Brammer <cbrammer@gmail.com> wrote:
>
> 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

```

## Brian Gernhardt, 2010-12-23 17:18

Subject: Re: StandardInput Not Continuing Process
Message-ID: <345E4AAA-63E3-4949-8486-A636793DDBC8@silverinsanity.com>
URL: https://gitlist.dev/e/345E4AAA-63E3-4949-8486-A636793DDBC8%40silverinsanity.com
In-Reply-To: <AANLkTikvrDWYT8h_MCESd9sg4_8ykSOq3XFEsoNsYDuZ@mail.gmail.com>

```

OnOn Wed, Dec 8, 2010 at 10:25 AM, Chase Brammer <cbrammer@gmail.com> wrote:
> 
> 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.

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

~~ Brian

```

## Junio C Hamano, 2010-12-23 17:20

Subject: Re: StandardInput Not Continuing Process
Message-ID: <7vbp4c2yph.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vbp4c2yph.fsf%40alter.siamese.dyndns.org
In-Reply-To: <AANLkTikvrDWYT8h_MCESd9sg4_8ykSOq3XFEsoNsYDuZ@mail.gmail.com>

```
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?

```

## Tay Ray Chuan, 2010-12-25 02:45

Subject: Re: StandardInput Not Continuing Process
Message-ID: <AANLkTi=2QV-pwDx1rVYVbG6zxK9mxmXQ6hMs2XvdzM0Y@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3D2QV-pwDx1rVYVbG6zxK9mxmXQ6hMs2XvdzM0Y%40mail.gmail.com
In-Reply-To: <AANLkTikBdOLjzJxikXCwTs52RByfNZzKamK+F-JhY0mQ@mail.gmail.com>

```
On Thu, Dec 9, 2010 at 1:25 AM, Chase Brammer <cbrammer@gmail.com> wrote:
> 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.

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

```
