diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 0ba0251caa507252010b64a0f8b95aa80d9c1059..b810023c5a90e79b1aa501212dec49fe21a1b777 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -425,12 +425,21 @@ def fetch(self):
             if self.git_version > ver('1.7.10'):
                 args.append('--single-branch')
 
+            cloned = False
             # Yet more efficiency, only download a 1-commit deep tree
             if self.git_version >= ver('1.7.1'):
-                args.extend(['--depth','1'])
+                try:
+                    self.git(*(args + ['--depth','1', self.url]))
+                    cloned = True
+                except spack.error.SpackError:
+                    # This will fail with the dumb HTTP transport
+                    # continue and try without depth, cleanup first
+                    pass
+
+            if not cloned:
+                args.append(self.url)
+                self.git(*args)
 
-            args.append(self.url)
-            self.git(*args)
             self.stage.chdir_to_source()
 
             # For tags, be conservative and check them out AFTER