diff --git a/templates/fetch_repos b/templates/fetch_repos
index 068804068c53bc8034ea252b4125179c85356ead..79f37408ea7329efb78dd10b045aea029e3be374 100755
--- a/templates/fetch_repos
+++ b/templates/fetch_repos
@@ -4,11 +4,12 @@
 #!/usr/bin/env python3
 {% endif %}
 # -*- coding: utf-8 -*-
+
 import grp
 import os
 import pwd
 import shutil
-from subprocess import call
+import subprocess
 import yaml
 
 DEFAULT_PRIVATE_REPO = "/opt/odoo/private_addons"
@@ -20,8 +21,17 @@ if os.path.isfile(REPO_FILE):
     repos = yaml.safe_load(open(REPO_FILE))
     if repos:
         for repo in repos:
-            call(["git", "clone", "-b", repos[repo]["branch"], "--depth", "1", repos[repo]["url"],
-                  DEFAULT_PRIVATE_REPO+"/"+repo])
+            subprocess.run(
+                [
+                    "git",
+                    "clone",
+                    "--single-branch",
+                    "--branch", repos[repo]["branch"],
+                    "--depth", "1",
+                    repos[repo]["url"],
+                    DEFAULT_PRIVATE_REPO + "/" + repo
+                ],
+                check=True)
 
 {% if instance_odoo_setup.odoo_version == '10.0' %}
         if os.path.isdir("/opt/odoo/private_addons/lf_theme"):
diff --git a/templates/fetch_repos_addons b/templates/fetch_repos_addons
index 249bd8704afc409a03dbe3b8113ee0ad66975d94..8b3eee55ddf965b56fe02d15ee46ea21138d3994 100755
--- a/templates/fetch_repos_addons
+++ b/templates/fetch_repos_addons
@@ -4,11 +4,12 @@
 #!/usr/bin/env python3
 {% endif %}
 # -*- coding: utf-8 -*-
+
 import grp
 import os
 import pwd
 import shutil
-from subprocess import call
+import subprocess
 {% if instance_odoo_setup.odoo_version == '10.0' %}
 from urlparse import urlsplit
 {% else %}
@@ -26,8 +27,16 @@ if os.path.isfile(REPO_ADDON_FILE):
     if repos:
         for url in repos:
             repo = urlsplit(url).path
-            call(["git", "clone", "-b", repos[url]["branch"], "--depth", "1",
-                  url, "/tmp/addon"+repo])
+            subprocess.run(
+                [
+                    "git",
+                    "clone",
+                    "--single-branch",
+                    "--branch", repos[url]["branch"],
+                    "--depth", "1",
+                    url, "/tmp/addon" + repo
+                ],
+                check=True)
             for module in repos[url]["modules"]:
                 shutil.move("/tmp/addon"+repo+"/"+module,
                             DEFAULT_PRIVATE_REPO+"/"+module)