git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ernesto Alfonso <erjoalgo@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: disable interactive prompting
Date: Wed, 04 Oct 2017 10:09:26 -0700	[thread overview]
Message-ID: <87mv56hmbd.fsf@gmail.com> (raw)
In-Reply-To: <20171004170119.GO19555@aiede.mtv.corp.google.com> (Jonathan Nieder's message of "Wed, 4 Oct 2017 10:01:19 -0700")

Hi,

The prompt asks for my https username/password:


> $ grv
> origin	https://github.com/user/dotemacs (fetch)
> origin	https://github.com/user/dotemacs (push)
> $ gpom
> [1] 22549
> $ Username for 'https://github.com': 
> $ fg
> { git push origin master &>/dev/null < /dev/null; LAST=$?; test 0 -eq $LAST || echo "gpom failed with $LAST !"; }
> Password for 'https://asd,csd@github.com': 
> gpom failed with 128 !
> $ 


Thanks,

Ernesto

Jonathan Nieder <jrnieder@gmail.com> writes:

> Hi Ernesto,
>
> Ernesto Alfonso wrote:
>
>> Waiting for git-push synchronously slows me down, so I have a bash
>> alias/function to do this in the background. But when my origin is https, I
>> get an undesired interactive prompt. I've tried to disable by
>> redirecting stdin:
>>
>> git push ${REMOTE} ${BRANCH} &>/dev/null </dev/null
>>
>> but I still get an interactive prompt.
>>
>> Is there a way to either
>>
>> 1. disable interactive prompting
>> 2. programmatically determine whether a git command (or at least a git
>> push) would interactively prompt
>
> You left out an important detail: what does the interactive prompt in
> question say?
>
> The general question is also interesting, but seeing the particular
> prompt would make it easy to look into the specific case at the same
> time.
>
> Thanks,
> Jonathan

  reply	other threads:[~2017-10-04 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 16:10 disable interactive prompting Ernesto Alfonso
2017-10-04 17:01 ` Jonathan Nieder
2017-10-04 17:09   ` Ernesto Alfonso [this message]
2017-10-04 17:05 ` Jeff King
2017-10-04 17:46   ` Ernesto Alfonso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv56hmbd.fsf@gmail.com \
    --to=erjoalgo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).