Thread (1 message) 1 message, 1 author, 2017-10-04

Re: disable interactive prompting

From: Ernesto Alfonso <hidden>
Date: 2017-10-04 17:09:36

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 [off-list ref] writes:
Hi Ernesto,

Ernesto Alfonso wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help