From 3ce4184f8c7ee6c5aa336cd5edb05e6d85739312 Mon Sep 17 00:00:00 2001 From: "szager@chromium.org" Date: Thu, 11 Jul 2013 17:38:57 +0000 Subject: [PATCH] Document the use of GIT_ASKPASS and SSH_ASKPASS. BUG= R=dpranke@chromium.org Review URL: https://codereview.chromium.org/18851004 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@211148 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_scm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gclient_scm.py b/gclient_scm.py index 3a9e90ed6..31296d02d 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -1031,6 +1031,13 @@ class GitWrapper(SCMWrapper): kwargs.get('filter_fn')) kwargs.setdefault('print_stdout', False) # Don't prompt for passwords; just fail quickly and noisily. + # By default, git will use an interactive terminal prompt when a username/ + # password is needed. That shouldn't happen in the chromium workflow, + # and if it does, then gclient may hide the prompt in the midst of a flood + # of terminal spew. The only indication that something has gone wrong + # will be when gclient hangs unresponsively. Instead, we disable the + # password prompt and simply allow git to fail noisily. The error + # message produced by git will be copied to gclient's output. env = kwargs.get('env') or kwargs.setdefault('env', os.environ.copy()) env.setdefault('GIT_ASKPASS', 'true') env.setdefault('SSH_ASKPASS', 'true')