Commit 3ce4184f authored by szager@chromium.org's avatar szager@chromium.org

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
parent cc56ee4c
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment