Coincidentally, I've been mulling the same idea for a week now. A self-hostable source forge + registry to serve artifacts would be amazing.
I think the only thing you'd lose is the 'social' aspects of GitHub, but I believe that can be made up with a combination of rss feeds (?), ActivityPub etc.