diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index a510a4fd0cf4..8ffc2c501571 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -17,6 +17,7 @@ import tempfile
 import utils
 
 poky_tag_remote = "git@push.yoctoproject.org:poky-ci-archive"
+tagged_repos = {"bitbake", "oecore", "meta-yocto"}
 
 parser = utils.ArgParser(description='Iterates over a set of repositories in a json file and sets up a shared directory containing them.')
 
@@ -55,7 +56,7 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil
             utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir, depth=1)
         if args.publish_dir:
             utils.publishrepo(tempdir, repo, args.publish_dir)
-        if repo == "poky" and args.tag:
+        if repo in tagged_repos and args.tag:
             utils.taggitrepo(tempdir, repo, repos[repo], poky_tag_remote, args.tag)
 
     utils.printheader("Creating shared src tarball")
diff --git a/scripts/utils.py b/scripts/utils.py
index efc7c991181e..a4de27e71722 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -283,10 +283,11 @@ def fetchgitrepo(clonedir, repo, params, stashdir, depth=None):
 def taggitrepo(clonedir, repo, params, tagremote, tagname):
     sharedrepo = "%s/%s" % (clonedir, repo)
     revision = params["revision"]
+    tag = f"{repo}/{tagname}"
     print("Creating tag...")
-    subprocess.check_call(["git", "tag", tagname, revision], cwd=sharedrepo)
+    subprocess.check_call(["git", "tag", tag, revision], cwd=sharedrepo)
     print("Pushing tag...")
-    subprocess.check_call(["git", "push", tagremote, tagname], cwd=sharedrepo)
+    subprocess.check_call(["git", "push", tagremote, tag], cwd=sharedrepo)
 
 def publishrepo(clonedir, repo, publishdir):
     sharedrepo = "%s/%s" % (clonedir, repo)
