Reviewed-on: #10 |
||
---|---|---|
.codeberg | ||
.gitea/ISSUE_TEMPLATE | ||
LICENSE | ||
README.md |
README.md
Table of contents
- Why should we mirror to Codeberg™?
- Resources
- FAQ
- GitHub - Codeberg mirroring tutorial
- GitLab - Codeberg mirroring tutorial
- Special thanks
- License
- Legal notice
Why should we mirror to Codeberg™?
- Codeberg is libre, free, open-source, privacy-friendly, non-profit, really fast
- GitHub™ has bloated interface & GitHub is privacy-invasive, Microsoft-owned, proprietary, vendor-lock-in, Tor-hostile
- GitHub Copilot™ attacks copyleft licensing
- GitLab™ uses Google's horrible-to-navigate user interface (for Cadence & me) & GitLab is too slow (for many people & me), not fully open-source, for-profit, Tor-hostile, hosted on Google Cloud™, proxied through Cloudflare™ and even more vendor-lock-in than GitHub (Example: You must sign in to search for issues on GitLab!)
- People on Codeberg like me can contribute to the project
- GitHub & GitLab can take down our repos
- You can clone a Git repository with an IPv6 address from Codeberg, which still doesn't work with GitHub at the moment
Resources
- https://sfconservancy.org/GiveUpGitHub
- https://github.com/humanetech-community/awesome-humane-tech/issues/33
- https://github.com/ungoogled-software/ungoogled-chromium/discussions/1894
- https://cadence.moe/blog/2022-07-03-git-forge-opinions-github-gitlab-gitea-sourcehut
- https://github.com/andersju/webbkoll/issues/35
- https://docs.codeberg.org/advanced/migrating-repos
FAQ
-
Q: GitHub Actions is a huge time saver for me. Forcing all contributors to modify their current setup and move to another hosting may just cause losing contributors in the end.
A: As I said, we only just mirror. The repo will be available and contributable on both sites.
-
Q: I can make a read-only mirror.
A: As I said, we should have a mirror that's contributable.
-
Q: Is transferring issues possible? Issues here represent a technical knowledge base we can't live without. Is transferring wiki and all edit history possible?
A: Yes, it's possible.
a. Example for issues:
b. Example for commits:
c. Example for wiki:
- https://github.com/Freeyourgadget/Gadgetbridge/wiki/Home/_history?page=2
- https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Home?action=_revision
-
Q: Despite having mirror(s), the project will still continue to be operated from GitHub for development, so having yet another mirror doesn't solve anything.
A: You can create issues, contribute, view the repos on there without going to GitHub! Example:
-
Q: My repos are very bandwidth-intensive projects, and I have my doubts as to whether the owner(s) of Codeberg would be prepared for such a massive bandwidth rate increase. I've also had individual projects be disabled on small sites before due to taking too much bandwidth.
A: Oh.. I think you should directly ask https://docs.codeberg.org/contact about if they are ready for massive bandwidth rate.
-
Q: Is Codeberg hosted with renewable or non-polluting energy sources?
A: I opened an issue asking Codeberg about this: Codeberg/Community#856
GitHub - Codeberg mirroring tutorial
There are multiple ways to accomplish this, including ways other than the ones listed below.
Step 1 - Initial Repository Migration From GitHub:
This is done through the Codeberg website.
Generate a Personal Access Token and use the new migration Codeberg option to create a mirror of the GitHub repository.

Commits, issues, pull requests, labels & more will be migrated with this option.
Note: Treat your access token like a password. It is recommended to set up a limited scope for your access token.
Step 2 - Mirror GitHub Commits To Codeberg:
Makes it possible so that commits made are pushed to GitHub & Codeberg.
Option 1 - Using the git command line
git remote set-url --add --push origin https://codeberg.org/user/repo.git
Note: Replace https://codeberg.org/user/repo.git
with your Codeberg repository URL from Step 1.
Option 2 - Using GitHub Actions
Use GitHub Actions to push GitHub commits to Codeberg. Example GitHub Actions file can be found here.
Note: This requires you to generate and add SSH keys to both Codeberg & GitHub.
Step 3 - Mirror Codeberg Commits To GitHub:
Makes it possible so that commits made on Codeberg are pushed to GitHub.
Use the "Mirror Settings" option (can be found in your Codeberg repository setting) to set up a push mirror from Codeberg to GitHub.
- Under
Git Remote Repository URL
, input your GitHub repository URL - In the
Authorization
dropdown, enter your GitHub username in theUsername
input and use your access token (you can use the same token you generated in Step 1) in thePassword
input - Click the
Sync when commits are pushed
checkbox - Set your desired
Mirror Interval

GitLab - Codeberg mirroring tutorial
Step 1 - Initial Repository Migration From GitLab:
In Codeberg, create a new migration to create a mirror of your GitLab repository.
Commits, issues, pull requests, labels & more will be migrated with this option.
Step 2 - Mirror GitLab Commits To Codeberg:
Makes it possible so that commits made are pushed to GitLab & Codeberg.
Option 1 - Using the git command line
git remote set-url --add --push origin https://codeberg.org/user/repo.git
Note: Replace https://codeberg.org/user/repo.git
with your Codeberg repository URL from Step 1.
Option 2 - Using GitLab repository mirroring
In your GitLab repository, head to Settings -> Repository -> Mirroring repositories.
- Git repository URL:
ssh://codeberg.org/user/repo.git
- Mirror direction: Push
- Authentication method: SSH public key
- Keep divergent refs: Recommend to enable especially if you're going to have Codeberg Pages
- Mirror only protected branches: Enable if you just want to mirror the
main
and/or any other branches marked as protected

Click on the copy button to copy the SSH public key.

Back in your migrated Codeberg repository, head to Settings -> Deploy Keys -> Add Deploy Key. Paste the SSH public key and tick Enable Write Access.

Special thanks
-
Many GitHub repo owners who provided useful questions for the FAQ
If you aren't on the above list, don't feel bad about it. We still give our regular thanks to you.
License
This text is dedicated to public domain and is therefore licensed under the CC0 1.0 License.
Legal notice
This repository is not affiliated with any of the mentioned companies and Codeberg e.V. Trademarks belong to their respective owners.
Codeberg is a registered trademark of Codeberg e.V. GitHub and GitHub Copilot are registered trademarks of GitHub, Inc. GitLab is a registered trademark of GitLab Inc. Google Cloud is a registered trademark of Google LLC. Cloudflare is a registered trademark of Cloudflare, Inc.