Harden git cloning

Change-Id: Ie2659a265c5198c106c85f1ac0cf938ece29b286
This commit is contained in:
Joshua Hesketh 2015-05-01 11:59:36 +10:00
parent 8e166e0dc6
commit 5ef62278f3
1 changed files with 7 additions and 0 deletions

View File

@ -320,6 +320,13 @@ class ShellTask(Task):
tries += 1
return_code = utils.execute_to_log(cmd, self.git_prep_log,
env=git_args, cwd=local_path)
if tries >= 2:
# Try upping the post buffer. See:
# http://stackoverflow.com/questions/6842687/
# the-remote-end-hung-up-unexpectedly-while-git-cloning
utils.execute_to_log(
"git config --global http.postBuffer 1048576000",
self.git_prep_log, env=git_args, cwd=local_path)
if tries >= 3:
break
if return_code != 0: