Skip to content

Commit

Permalink
Make git non-interactive when checking for src-internal access
Browse files Browse the repository at this point in the history
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
bower/bower#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
  • Loading branch information
scottmg@chromium.org committed Feb 27, 2014
1 parent eca4620 commit cc130b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win_toolchain/get_toolchain_if_necessary.py
Expand Up @@ -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

Expand Down

0 comments on commit cc130b9

Please sign in to comment.