Harden git cloning
Change-Id: Ie2659a265c5198c106c85f1ac0cf938ece29b286
This commit is contained in:
parent
8e166e0dc6
commit
5ef62278f3
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user