TBH have you tried just basic git? There’s a web interface built into git itself and you can use ssh for your repositories. It’s simple and just works. If you need a faster web interface there’s also cgit. There’s no bells and whistles either. Just configure ssh, drop your repos in /srv and get to work.
If you need more that just standard basic git the. The other suggestions here are great especially forgjo!
Restic, it has native S3 compatibility and when you combine with something like B2 it makes amazing offsite storage so you can enjoy the tried and true 3-2-1 backup strategy.
Also fedora magazine did a few posts on setting it up with systemd that makes it SUPER EASY to get going if you need a guide.
I have an ansible role that configures it on everyone’s laptops so that they have local, NAS, and remote, B2, backup locations.
Works like a charm for the past 8+ years.