How can I setup a mirror of a GitHub repo on codeberg, without having to grant permission to codeberg?
Why?
Since 2025, I’ve had an occasional issue where my work on GitHub gets locked behind an authwall. That’s not okay. Our work should be publicly accessible to all users, including users who have to use Tor Browser. And including users who don’t have GitHub accounts.
GitHub has lots of users and great visibility for FOSS projects. And free CI minutes (GitHub Actions) on three platforms (Windows, Linux, and macOS), which isn’t really available (for free) on alternative git forges (at the time of writing). For these reasons, we’re not quite ready to completely “jump ship” away from GitHub. But we do want to setup a (read-only) mirror of our git repo’s contents on other sites, so it’s more accessible to all users on the Internet.
Permissionless
There’s lots of guides on the Internet for how to setup a codeberg mirror of a GitHub repo, but they mostly start with some step:
Obtaining API Key from GitHub
We don’t want to create an API Key with GitHub. In my experience, APIs rot and break over time. And, anyway, why should we have to give permission to the mirror to do a git clone? That’s already possible to do without any key.
🛈 Note: we have many developers, so we’d prefer not to update all of our dev sandboxes to include a second remote. Ideally, we want to update codeberg to auto-update itself from GitHub (once per day is sufficient) with a
git clone
How can we setup a simple, read-only codeberg mirror of a GitHub repo, without having to make any changes (eg creating an API key) on GitHub’s side?