Hacker News new | ask | show | jobs
by noirscape 80 days ago
I don't dislike Codeberg inherently, but it's not a "true" GitHub replacement. It can handle a good chunk of GitHub repositories (namely those for well established FOSS projects looking to have everything a proper capital P project has), but if you're just looking for a generic place to put your code projects that aren't necessarily intended for public release and support (ie. random automation scripts, scraps of concepts that never really got off the ground, things not super cleaned up), they're not really for that - private repositories are discouraged according to their FAQ and are very limited (up to 100mb).

They also don't want to host your homepage, so if GitHub Pages is why you used GitHub, they are not a replacement.

Unfortunately I don't think there's really an answer to that conundrum that doesn't involve just spinning up your own git server and accepting all the operational overhead that comes with it. At least Forgejo (software behind Codeberg) is FOSS, so you can do that and it should cover most of what you need (and while you're in the realm of having a server, a Pages-esque replacement is trivial since you're configuring a webserver anyway.) Maybe Gitlab.com, although I am admittedly unfamiliar with how Gitlab's "main" instance has changed over the years wrt features.

Here's their FAQ on the matter, it's worth a read: https://docs.codeberg.org/getting-started/faq/

12 comments

What you said about the pages is just plainly false information. I host my website on CodeBerg pages. https://docs.codeberg.org/codeberg-pages/
> They also don't want to host your homepage, so if GitHub Pages is why you used GitHub, they are not a replacement.

https://docs.codeberg.org/codeberg-pages/

From their FAQ:

> If you do not contribute to free/libre software (or if it is limited to your personal homepage), and we feel like you only abuse Codeberg for storing your commercial projects or media backups, we might get unhappy about that.

Emphasis mine. This isn't about if it's technically possible (it certainly is), it's whether or not it's allowed by their platform policies.

Their page publishing feature seems more like it's meant for projects and organizations rather than individual people. The way it's described here indicates that using them to host your own blog/portfolio/what have you is considered to be abusing their services.

Seems fair to me, they're a nonprofit that exists in our lived reality and not an abusive monopolist that can literally throw a billion dollars to subsidize loss leaders.

All it shows the world is why there needs to be a VAT like tax against US digital services to help drive a public option for developers.

There's no reason why the people can't make our own solutions rather than be confined to abusive private US tech platforms.

Adding taxes to things does not help anyone and goes against free choice.

A better alternative would be to create the incentives so that companies like these can be born in Europe.

Companies like Microsoft should not be given "incentives to exist" anywhere (at least as they exist currently). They are corrosive to the public good.
Are you sure? Enumerate all the competition and associated technilogy this has enabled for decades: tooling, software, etc.

I am not sure how someone should be entitled to prevent others from enjoying thr benefits of better technology.

If you do not like it, just skip it, as I do.

This doesn't work in when a market is run by oligopolies, you have to regulate to restore some sort of normalcy and competition.
Oligopolies are the result of overregulation.

Just fix the right things, not the wrong ones.

Disagree the only alternative is to let the people decide, I don't trust a dozen men that already have deeply undemocratic beliefs to dictate the direction of tech for society.

You are against democracy, I am not. Democracy has led to some of the best advances of civilization, all oligarchies have done is introduce mass poverty, mass misery, and mass death.

At least with democracy we went to the moon for mankind, not shareholders.

No. I am not against democracy. If you do not like what someone does, you have rights to fight for.

Your definition of not letting people choose goes more against democracy that what I mean IMHO.

Just do not let these people collude with the power. Fewer politicians would mean fewer people doing business to influence others through politics.

That is what my experience tells me.

Reading what you quoted, no it is not, as long as you contribute to free software or you have projects that are open source. Not just your personal homepage. If you only have a personal homepage and nothing else that is open source, then they have a problem.

My 2 cents.

Which makes it not really a suitable replacement for GitHub, which is my entire point.

Keep in mind, I'm not saying Codeberg is bad, but it's terms of use are pretty clear in the sense that they only really want FOSS and anyone who has something other than FOSS better look elsewhere. GitHub allowed you to basically put up anything that's "yours" and the license wasn't really their concern - that isn't the case with Codeberg. It's not about price or anything either; it'd be fine if the offer was "either give us 5$ for the privilege of private repositories or only publish and contribute public FOSS code" - I'm fine paying cash for that if need be.

One of the big draws of GitHub (and what got me to properly learn git) back in the day with GitHub Pages in particular was "I can write an HTML page, do a git push and anyone can see it". Then you throw on top an SSG (GitHub had out of the box support for Jekyll, but back then you could rig Travis CI up for other page generators if you knew what you were doing), and with a bit of technical knowledge, anyone could host a blog without the full on server stack. Codeberg cannot provide that sort of experience with their current terms of service.

Even sourcehut has, from what I can tell, a more lenient approach to what they provide (and the only reason why I wouldn't recommend sourcehut as a GitHub replacement is because git-by-email isn't really workable for most people anymore). They encourage FOSS licensing, but from what I can tell don't force it in their platform policies. (The only thing they openly ban is cryptocurrency related projects, which seems fair because cryptocurrency is pretty much always associated with platform abuse.)

(SSG - static site generator)

I mean, it is arguably much easier to just write the HTML page and upload it with FTP and everyone can see it. I never understood why github became a popular place to host your site in the first place.

> I never understood why github became a popular place to host your site in the first place.

Easy: it was free, it was accessible to people that couldn't spend money for a hosting provider (read: high schoolers) and didn't impose arbitrary restrictions on what you were hosting.

Back then, your options as a high school student were basically to either try and reskin a closed off platform as much as you could (Tumblr could do that, but GitHub Pages also released in the time period where platforms were cracking down on all user customization larger than "what is my avatar") or to accept that the site you wanted to publish your stuff on could disappear at any moment the sketchy hosting provider that provided you a small amount of storage determined your bandwidth costs meant upselling you on the premium plan.

GitHub didn't impose those restrictions in exchange for being a bit less interactive when it came to publishing things (so no such thing as a comment section without using Disqus or something like that, and chances are you didn't need the comments anyways so win-win) That's why it got a lot more popular than just using an FTP server.

There are multiple reasons why FTP by itself became obsolete. Some of them I can think of off the top of my head:

1) Passive mode. What is it and why do I need it? Well, you see, back in the old days, .... It took way too long for this critical "option" to become well supported and used by default.

2) Text mode. No, I don't want you to corrupt some of my files based on half-baked heuristics about what is and isn't a text file, and it doesn't make any sense to rewrite line endings anymore anyway.

3) Transport security. FTPS should have become the standard decades ago, but it still isn't to this day. If you want to actually transfer files using an FTP-like interface today, you use SFTP, which is a totally different protocol built on SSH.

Because it doesn't require you to run an HTTP server, FTP server, or install an FTP client.
That FAQ snippet is insane to me. Maybe it's a cultural thing but I'd never do business with a company that has implicit threats in their ToS based on something so completely arbitrary.
The worst part is really the unclear procedure. If they set out terms that say they'll give me 4 weeks to migrate projects they don't like off the platform, with n email reminders in between, then that's not ideal but fine. As it is, I'd be worried I'll wake up to data loss if they get 'unhappy'. I have the same problem with sourcehut, actually, with their content policy.
What an absurd double standard. The language is patterned after GitHub's own caveats about misuse of GitHub Pages:

> you may receive a polite email from GitHub Support suggesting strategies[… such as, and including] moving to a different hosting service that might better fit your needs

GitHub Pages has never been a free-for-all. The acceptable use policy makes it clear:

> the primary focus of the Content posted in or through your Account to the Service should not be advertising or promotional[…] You may include static images, links, and promotional text in the README documents or project description sections associated with your Account, but they must be related to the project you are hosting on GitHub

Nonprofit, not a company. as far as I can tell they don’t accept payment for anything so they don’t want your “business”.
Which is why they are not a Github replacement for everyone.
They're a perfectly fine replacement if you care about FOSS and OSS, unlikely github + msft.
Well it's kind of describing the reality that exists at other companies today. Most ToS's have clauses where they can kick you off for not using it as intended, solely at their discretion. At least these guys are honest and upfront about it. I do agree though some more guidelines around their policy would be nice.
and we feel like you only abuse Codeberg for storing your commercial projects or media backups

Sounds like they're cool with a little personal website.

Unfortunately I don't think there's really an answer to that conundrum that doesn't involve just spinning up your own git server and accepting all the operational overhead that comes with it.

Hmm all that operational overhead... Of an ssh server? If you literally just want a place to push some code, then that really isn't that hard.

Lots and lots of programmers have very little understanding and especially operation knowledge of how to host a public service. You can be an extreme graphics programmer and not know the web stack at all.

And no, its not that hard once you learn. Except, now its a never ending chore when it was an appliance. Instead of a car you have a project car.

> Lots and lots of programmers have very little understanding and especially operation knowledge of how to host a public service. You can be an extreme graphics programmer and not know the web stack at all.

Can confirm.

Also, not everyone who wants to share content publicly has a domain name with which to do so, or the kind of Internet connection that allows running a server. If you include "hosting" by using a hosting provider... it's perfectly possible (raises hand) to not even have any experience with that after decades of writing code and being on the Internet. (Unless you count things like, well, GitHub and its services, anyway.)

On the other hand you probably don't need to go full k8s and datadog on it. Just host it. Use a PaaS so you don't need to do Linux admin.
I think both of you are misunderstanding what I proposed. You just need a single VM with an ssh server. Literally no web service needed, if all you want to do is host some code remotely.
I didn't misunderstand. Sshd is a web service. Most folks don't already know how and don't want to set up a machine that is always on, that will restart on power loss, that will have a static IP or dynDNS, with a domain name and proper routing and open ports and certs and enough bandwidth and that's before you even worry about actual security and not just what is needed to work.... It's actually a big annoyance if you don't do it all the time.
ssh isn't a web service (some would argue that smtp and ftp aren't too as they came before the web).

And I believe GP was talking about the only thing you need is:

  ssh user@remotehost git init --bare repo.git
And then you can add the remote to your local repo with

  git remote add origin user@remotehost:repo.git
Now all you need to do is

  git push origin branch_name
Replace origin with another identifier if it's already taken.
The web is not the Internet.
VM and ssh. Needs linux admin exp. Security updates. Understand how to securely connect from an IP without opening 22 on 0.0.0.0/0
Opening ssh to the internet is fine if you are using key based auth, which is the default on many VM setups.
In case anybody is interested, having a bare git repo on a server is as easy as:

    # locally
    ssh git@example.com
    
    # server
    mkdir repo.git  
    cd repo.git  
    git --bare init
    
    # locally
    git remote add origin ssh://git@example.com/home/git/repo.git  
    git push origin master

P.S. I know it does not have the same features as github
If it's your ssh server and it's single user you don't need to use the "git@" part at all.

Just store the repo and access it with your account.

The whole git@ thing is because most "forge" software is built around a single dedicated user doing everything, rather than taking advantage of the OS users, permissions and acl system.

For a single user it's pointless. For anyone who knows how to setup filesystem permissions it's not necessary.

I prefer to be explicit about which user is connecting to ssh.
There isn't much advantage that can be taken from O/S users and perms anyway, at least as far as git is concerned. When using a shared-filesystem repository over SSH (or NFS etc.), the actually usable access levels are: full, including the abilities to rewrite history, forge commits from other users, and corrupt/erase the repo; read-only; and none.
Git was build to be decentralized with everyone having its own copy. If it's an organization someone trusted will hold the key to the canonical version. If you need to discuss and review patches, you use a communication medium (email, forums, IRC, shared folder,...)
Git was built to be decentralized but it ended up basically displacing all other version control systems, including centralized ones. There are still some holdouts on SVN and even CVS, and there are niche professional fields where other systems are preferred due to tighter integration with the rest of their tools and/or better binary file support, but, for most people, Git is now synonymous with version control.
It has all the same working features as github
But they don't literally just want a place to push some code. The problem statement included "if GitHub Pages is why you used GitHub".
And before that it said...

but if you're just looking for a generic place to put your code projects that aren't necessarily intended for public release and support (ie. random automation scripts, scraps of concepts that never really got off the ground, things not super cleaned up), they're not really for that - private repositories are discouraged according to their FAQ and are very limited (up to 100mb).

You don't need a one size fits all solution...

Exactly, it's super easy. You only need the first part of this guide https://www.youtube.com/watch?v=40SnEd1RWUU
Do most vps providers enable password based ssh access on first boot up? That video doesn't seem very relatable.
Exactly. It’s much simpler
> ...that really isn't that hard.

Until the AI scrapers[1] come for you at 5k requests per second and you're doing operations in hard-mode.

1. Most forges have http pages for discoverability. I suppose one could hypothetically setup an ssh-only forge and statically generate a html site periodically, but this is already advanced ops for the average Github user

This isn't a real thing and if it ever becomes a thing you can sue them for DDOS and send Sam Altman to jail. AI scraping is in the realm of 1-5 requests per second, not 5000.
I wasn't proposing a full on forge, just a VM with a (key auth only) ssh server to push code to/from.
fail2ban
... is snakeoil in the era of (undeservedly) respected megacorporations operating botnets.
(Shameless plug)

Hey, I’m building Monohub - as a GitHub alternative, and having private repositories is perhaps a key feature - it started as a place for me to host my own random stuff. Monohub [dot] dev is the URL. It’s quite early in development, so it’s quite rough around the edges. It has PR support though.

Hosted in EU, incorporated in EU.

Would be happy if you tried it out — maybe it’s something for you.

Edit: you can have a look at a public repository I have to see what it looks like now: https://monohub.dev/@tbayramov/efcore-audit-timestamps

Are you using an existing forge package (like eg Forgejo which codeberg is built on) or something custom?
Custom-built on top of libgit2.
Not trying to be dismissive/snarky... But why?
I started developing it as a slim wrapper around Git to support my own needs. At the same time, it is essential to have rich features like pull requests/code review, so I started focusing on designing a tool that strikes an appropriate balance between being minimalistic and functional. One thing that I focus on is allowing users to disable any feature they don't need.
Doesn’t .dev belong to Google? An old choice or provider for a EU-focused hosting.
And the site also uses Cloudflare (for domain registrar, DNS and CDN):

   ipinfo monohub.dev
  Core
  - IP           188.114.96.1
  - Anycast      true
  - Hostname     
  - City         San Francisco
  - Region       California
  - Country      United States (US)
  - Currency     USD ($)
  - Location     37.7621,-122.3971
  - Organization AS13335 Cloudflare, Inc.
  - Postal       94107
  - Timezone     America/Los_Angeles
Auth is hosted by Kinde (an Australian company, uses AWS)

Domain whois: https://monohub.dev.whoswho

It belonged to everyone until Google became the TLD operator.

(Yes, I'm still salty google broke our localhost .dev sites.)

(Yes, I know it was never a reserved TLD.)

FWIW, Pierre's "Code Storage" project [1] seems like it simplifies a lot of the operational overhead of running git servers, if what you want is "an API for git push". Not affiliated with the company (and I haven't tried it myself, so I can't vouch for how well it works), I just think it's a neat idea.

1: https://code.storage/

I think "Code Storage" (definitely needs a unique name), is less an API for git push (surely git push is that API?), and more an API for "git init"? It seems to be Git as infrastructure, rather than Git as a product. i.e. if you're using it for a single repo it's probably not a good fit, it's for products that themselves provide git repos.
To me that sounds like Github does too many things, not that Codeberg does too few.
Indeed. A code repository alternative should definitely not require an equivalent to Github Pages.
To me, and devs at large (given their market share), that sounds like convenience.
Either take some responsibility and properly evaluate what that convenience means for you long term or don't complain when they leverage that vendor lock in at your disadvantage.
I love Gitea and self-hosting it has been effortless, even through upgrades.
Forgejo, even. Both awesome, truly capable Github alternatives.
"spinning up your own git server" isn't really a thing. Any server with ssh and git installed is a git server.
GitLab is probably a better option for that.
Yeah, but ooh boy is a private gitlab server complicated. Omnibus installation helps manage that, but if you outgrow it you're in for a complicated time.

Also gitlab has cves like every other week... You're going to be on that upgrade train, unless you keep access locked down (no internet access!!) and accept the admittedly lower risk of a vulnerable gitlab server on your LAN/VPN network.

Even if gitlab is updated fully, you're fighting bot crawlers 24/7.

Private repositories can be hosted anywhere you have SSH access. Write the URL as username@host:/path
Why would you want your remote source control repository to host your homepage?
> Moving from GitHub to Codeberg, for lazy people

Step 1.) Stay on GitHub

I think the internet has "GitHub Derangement Syndrome" right now. It's an outlet for people's frustration.

The current trend reminds me a lot of the couple years we had where Game Developers were that outlet. They needed to "Wake up" and not "Go woke, go broke". An incredible amount of online discourse around gaming was hijacked by toxic negativity.

I'm sure every individual has their really good logical reasons, but zooming out I think there is definitely a similar social pathology at play.

> I think the internet has "GitHub Derangement Syndrome" right now. It's an outlet for people's frustration.

I would argue that the open source people aren't the only ones paying attention right now.

If you are hosting proprietary code on Github, it has become clear that Microsoft is going to feed that into their AI training set. If you don't want that, you don't have a choice but to leave Github.

you just disable the setting
By the same company who admits that disabling telemetry does not in fact disable telemetry and refuse to fix it.
I take it you've never disabled Windows telemetry settings and had them magically restored after an update?

This company either does what it wants to abuse people, or is too incompetent to make their software work as instructed. Both possibilities are bad. I expect the same translates to GitHub.

...and trust naively that that does anything
Dont forget that Github also hosts projects for DHS and ICE, people have a right to be angry and leave. The “one place for code” fantasy is over.