diff --git a/klaus/tarutils.py b/klaus/tarutils.py
index 3eeb2d6afd1857fe6fb6b44c0f93f1e98b5606ea..ce1af4280a3865509df1050f7467c060be9d1417 100644
--- a/klaus/tarutils.py
+++ b/klaus/tarutils.py
@@ -52,7 +52,11 @@ def tar_stream(repo, tree, mtime, format=''):
     buf = BytesIO()
     with tarfile.open(None, "w:%s" % format, buf) as tar:
         for entry_abspath, entry in walk_tree(repo, tree):
-            blob = repo[entry.sha]
+            try:
+                blob = repo[entry.sha]
+            except KeyError:
+                # Entry probably refers to a submodule, which we don't yet support.
+                continue
             data = ListBytesIO(blob.chunked)
 
             info = tarfile.TarInfo()