git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: disable interactive prompting

From
EAErnesto Alfonso <erjoalgo@gmail.com>
Date
Oct 4, 2017, 17:09 UTC
Message-ID
<87mv56hmbd.fsf@gmail.com>
In-Reply-To
<20171004170119.GO19555@aiede.mtv.corp.google.com>
Hi,
The prompt asks for my https username/password:
Show 11 quoted lines
> $ 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:
Show 28 quoted lines
> 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
Previous: Jonathan NiederNext: Jeff King
Message 3 of 5 in “disable interactive prompting”
  1. Ernesto AlfonsoOct 4, 2017
  2. Jonathan NiederOct 4, 2017
  3. Ernesto AlfonsoOct 4, 2017
  4. Jeff KingOct 4, 2017
  5. Ernesto AlfonsoOct 4, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.