There are
two unresolved problems preventing us from effectively replacing github or similar centralized forges with a fully decentralized/self-hosted ecosystem. These are the factors that keep pushing people back onto those platforms.
Note: Please add any major issues that you consider as a blocker. And, apologies for repeating some points that I expressed in other comments. I wasn't planning to write a top level comment.
So, Problem 1: Discoverability and network effects. This is the main reason why people keep going back to the largest platforms. There is practically zero chance of being seen or helped on self-hosted or small platforms. And this isn't because of a missing technical innovation either. Those platform has the size and first-mover advantage. What we need is a single feature-rich search interface to query all those projects spread over the net. That would need an index. Unlike the interface, the index itself can be distributed or replicated to avoid centralization. It should be able to store structured information about projects, like instructions (readme, usage, contributor guidelines, license text, CoC, etc), license, language, pull-request interface, issue tracker location, bug/security reporting information, project type, ownership details, signing information, etc. This will allow rich searches like what's possible on github and sourcegraph.
Problem 2: Communication channel. The biggest problem hindering distributed git hosting is a way to do pull-requests, code reviews, discussions, etc. Even with something like gitea, you need an account on every instance where you want to contribute. The truth is that we already have a communication channel that allows such a collaboration - email. We already have working proofs of how it operates at LKML and sourcehut. However, people have a particular dislike towards emails for git collaboration. IMO, this is actually the fault of email clients that absolutely massacre the elegance of plaintext emails. There are some powerful tools that's used with LKML that most people will never discover because of their hatred towards email. Sadly, email is a lost opportunity that could have been a delight with sufficient attention on the clients.
I have given up trying to convince people to give it a try. Email is somehow a taboo in this generation. So what else? There are projects like radicle (stable, more about it later) and forgefed (activitypub, under development) that try to build such a channel. But you really don't need to create such a channel for git. Git can adapt to any current channel (eg: xmpp/movim, nntp) using its extension mechanisms. Email was probably just the default channel. You can do patch pushes (git format-patch) and pull requests (git request-pull) practically through any such channel. With a bit of attention on the UI/DX, you can avoid the mistakes of emails (like html) that made them harder to use for our purpose. Additionally, you'll also need to build other development tools (issue tracker, code review, discussions etc) around them. People got too fixated on the platform approach and missed the possibilities of protocols.
Radicle: Honestly, I don't know what to make of it. It's a very impressive effort and they seem to have solved some very difficult problems. But radicle also seems to have gone for a platfom based approach and it encompasses everything. They seem to have an integrated issue tracker, CI system etc. If its scope was restricted to just a p2p network for discovering and exchanging git objects and other arbitrary information, we could have built a wide ecosystem of development tools on top of it. Radicle also feels like a darkweb that exists on a different plane from the web, though web bridges exist. For example, you can't do a clone of a repo from the net, unless it's bridged somewhere. However, I reserve my final opinion is reserved until I have a proper insight. I may have some wrong assumptions here. Please let me know if I do.