diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3333,6 +3333,13 @@
             )
             dropped.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
 
+        if b'shared' in requirements or b'relshared' in requirements:
+            raise error.Abort(
+                _(
+                    b"cannot create shared repository as source does not have 'store' requirement"
+                )
+            )
+
     return dropped