A GitHub alternative without AI: Codeberg, SourceHut, self-hosted Forgejo or Gitea, and GitLab with Duo off, compared on AI policy, private repos and cost.
•4 min read•Code Editors, IDEs & Playgrounds
Verdict:For public code, Codeberg is the closest AI-restrictive host; for private repos, self-host Forgejo or Gitea; SourceHut states it has no AI features; GitLab works if you turn Duo off.
| Tool | Price | Platforms | Best for | Tested |
|---|---|---|---|---|
| Codeberg | Free; run by a non-profit | Web | Public open source projects that want an AI-restrictive host | Docs only |
| SourceHut | $4, $8 or $12 a month to host projects; contributors do not pay | Web, Self-hosted | Maintainers who want a minimal host that states it has no AI features | Docs only |
| Forgejo | Free to self-host | Self-hosted | Private repositories on your own server with a community-governed forge | Docs only |
| Gitea | Free to self-host (MIT license) | Self-hosted | Small teams that want a light self-hosted forge with no seat fees | Docs only |
| GitLab | GitLab Duo is on by default and can be turned off per group or project | Web, Self-hosted | Teams already on GitLab that are willing to switch AI features off | Docs only |
Independent comparison. Paid placements are labelled separately; editorial links earn no affiliate commissions. Learn more.
If you want a Git host without AI features, there is no single drop-in swap. Codeberg suits public open source projects, SourceHut states that it has no AI features, and Forgejo or Gitea give you private repositories on a server you control. GitLab works only if you switch Duo off. The deciding questions are whether your code is public and whether you will run a server.
The complaint driving the search is specific. According to The Register's report from September 2025, developers asked for a way to stop Copilot generating issues and pull requests and reported that they could not disable Copilot code reviews. The article identified no working opt-out. Settings change, so check GitHub's current controls before you decide to leave.
Codeberg is a non-profit forge that runs Forgejo. Gentoo began a gradual move there, citing GitHub's push to use Copilot on its repositories, and kept a GitHub mirror while it migrated.
Its terms of use say projects consisting mostly of code from generative AI tools are not allowed. Public repositories must be free and open source software, open source hardware or free cultural works. Cryptocurrency projects are not allowed.
Private repositories are permitted only for things a free software project needs, such as secrets or internal discussion, plus small personal items. They cannot serve as personal cloud storage.
Who should not pick it: closed-source teams or anyone who needs unlimited private repos.
SourceHut is a hosted forge for open source projects. Its pricing page lists three monthly tiers, $4, $8 and $12, all with full access, and says contributors do not pay. The page also states that SourceHut has no AI features, which is the clearest written position among the hosts here.
The software is open source, so self-hosting is an alternative to paying. Check how it handles private repositories and your contributors' workflow before you move.
Who should not pick it: teams that expect GitHub's interface and its integrations.
Forgejo is a self-hosted forge. Its website says it will always be free and open source software, and lists a community under Codeberg e.V., a non-profit. The site makes no statement about AI features.
Running it yourself is what gives you control. Private repositories live on your server. The cost is yours: backups, updates, uptime and security.
You can also use Codeberg or other public instances if you only need public hosting.
Who should not pick it: anyone without time to maintain a server.
Gitea fills the same role. Its product page says it is open source under the MIT license and describes it as a free self-hosted Git platform. The page makes no statement about AI.
Choose it over Forgejo if you prefer its project direction or tooling. Both are open source forges you run yourself, so the AI question comes down to what you install and enable.
Who should not pick it: people who need a hosted service with support and no operations work.
GitLab can be self-managed as well as used on GitLab.com. Its documentation says Duo is on by default and experimental features are off by default. On GitLab.com there is no instance setting: an owner turns it off in settings for a top-level group, subgroup or project.
Instance-wide control on self-managed GitLab requires a paid Duo add-on or credits. A top-level setting of Always on prevents owners further down from switching it off.
Who should not pick it: people who want a host that never ships AI features. Duo exists and is on unless an owner turns it off.
| Codeberg | SourceHut | Forgejo | Gitea | GitLab | |
|---|---|---|---|---|---|
| AI stance on official page | Bars mostly AI-generated projects | States no AI features | No AI statement on site | No AI statement on site | Duo on by default, can be turned off |
| Private repos | Limited cases | Check before moving | Yes, your server | Yes, your server | Check GitLab's docs |
| Cost | Free | $4 to $12/month to host | Free to self-host | Free to self-host (MIT) | See GitLab's pricing |
| Effort | None | Low | Run a server | Run a server | Settings |
Public repositories are readable by anyone, so none of these hosts can stop public code from being copied. See the GitLab alternatives comparison if you are weighing GitLab itself, the free Git clients guide for working with any of these hosts, and the free code editors guide.
Nothing was installed or tested. GitHub's own opt-out options for a personal account were not found on an official page. Gitea's and Forgejo's sites make no statement about AI either way. Reddit threads were not read. Whether public code is scraped by AI crawlers was not researched.
SourceHut's pricing page states it has no AI features at all. Codeberg's terms bar projects made mostly by generative AI tools. Self-hosted Forgejo and Gitea make no AI statement on their sites, so on your own server you decide what runs.
Yes. GitLab's documentation says Duo is on by default. On GitLab.com an owner can switch it off for a top-level group, subgroup or project in settings. Self-managed instance-wide control needs a paid Duo add-on or credits, per the same page.
Only in limited cases. Codeberg's terms allow private repositories for things a free software project needs, such as secrets or internal discussion, and small personal items. They cannot be used as personal cloud storage. Teams with proprietary code should self-host instead.
heise reported that Gentoo began moving to Codeberg because GitHub kept pushing Copilot use on its repositories, keeping a GitHub mirror for now. The Register's September 2025 report listed users asking for ways to block Copilot-generated issues and code reviews.
No. Public repositories are readable by anyone, so a new host cannot stop copies of code you publish. Only keeping a repository private, for example on a server you control, limits who can read it. Treat the host choice as a decision about which AI features appear in your workflow, not as a technical shield for public code.
SourceHut's pricing page lists $4, $8 and $12 a month tiers for people who host projects, all with full access. Contributors to other people's projects do not pay. The software is open source, so you can self-host it instead of paying.
Kevin Fan is a SaaS founder. He runs Free Instead Of, which tracks free and open-source alternatives to paid software and checks each price and free-plan limit against the vendor's own pages.
Official pages were read on 2026-10-26: Codeberg's terms of use, SourceHut's pricing page, the Forgejo and Gitea sites, and GitLab's documentation on turning GitLab Duo on and off. The complaints about GitHub come from The Register's September 2025 report and heise's coverage of Gentoo's move. Reddit could not be accessed. Nothing was installed or tested.