Self-hosting with open source code:
- SourceHut: https://sr.ht/~sircmpwn/sourcehut/
- Forgejo (used by Codeberg, etc.): https://forgejo.org/
SourceHut never really clicked for me. It doesn't give me anything useful that I don't already have in a bare git repo through a ssh.
Forgejo, on the other hand, is a drop-in replacement for GitHub.
Also:
- https://about.gitea.com/ (F/OSS MIT license self hosting GitHub like instance)