Instead of relying on GitLab's API, it's probably a better idea to just use git
remotes properly. I put together a script [0] to automate the process to set the
primary remote to Sourcehut (git.sr.ht) and mirror to GitLab and GitHub. And yes,
that script is in a repo that's also mirrored to GitHub and GitLab (check the
README). It combines well with my `git pushall` alias [1].
Or Gitea, if you want to use a fraction of the resources! I use it solely as a GitHub backup — you can mirror Git repositories from anywhere and it pulls changes on a schedule. Literally set it up this week, thank goodness.
You can just sync with someone else’s repo by specifying it on the command line. Nothing to install, no script, nothing. It’s built into git and is right there in the single line summary of the man pages for git-fetch, git-pull etc: they all take a repository argument.