From 5ef62278f3a6ab6ac768d1ae954dc8e9b921a0c8 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Fri, 1 May 2015 11:59:36 +1000 Subject: [PATCH] Harden git cloning Change-Id: Ie2659a265c5198c106c85f1ac0cf938ece29b286 --- turbo_hipster/lib/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/turbo_hipster/lib/models.py b/turbo_hipster/lib/models.py index ad7ec86..1a2c836 100644 --- a/turbo_hipster/lib/models.py +++ b/turbo_hipster/lib/models.py @@ -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: