From cc130b9f4df1fd7fd10599d2880f60d82267557f Mon Sep 17 00:00:00 2001 From: "scottmg@chromium.org" Date: Thu, 27 Feb 2014 17:00:14 +0000 Subject: [PATCH] Make git non-interactive when checking for src-internal access git sometimes blocks asking for a password. On a random machine that didn't know anything about google/chromium, it failed immediately with "fatal: could not read Username for 'https://chrome-internal.googlesource.com': No such file or directory" but on my real machine w/o _netrc it blocks and wants this: Username for 'https://chrome-internal.googlesource.com': Password for 'https://chrome-internal.googlesource.com': There's no --non-interactive unfortunately, it's supposed to magically decide if it's connected to a tty and behave appropriately. It does not, perhaps because of being wrapped in depot_tools .bat files, perhaps an msysgit-port bug, perhaps being called from python. Anyway https://github.com/bower/bower/issues/1009 had a magic incantation that works for this case: 'true' is available in the msys distribution. R=iannucci@chromium.org BUG=323300 Review URL: https://codereview.chromium.org/182553004 git-svn-id: http://src.chromium.org/chrome/trunk/tools/depot_tools@253844 4ff67af0-8c30-449e-8e8b-ad334ec8d88c --- win_toolchain/get_toolchain_if_necessary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py index 033c091..266806b 100755 --- a/win_toolchain/get_toolchain_if_necessary.py +++ b/win_toolchain/get_toolchain_if_necessary.py @@ -126,7 +126,7 @@ def HaveSrcInternalAccess(): shell=True, stdin=nul, stdout=nul, stderr=nul) == 0: return True return subprocess.call( - ['git', 'remote', 'show', + ['git', '-c', 'core.askpass=true', 'remote', 'show', 'https://chrome-internal.googlesource.com/chrome/src-internal/'], shell=True, stdin=nul, stdout=nul, stderr=nul) == 0