The suggestions here are good for production. Over used aws secret manager and hashicorp vault before and both did everything we needed.
I find they're too much firepower for selfhosted, and prefer pass
Simple commandline tool, backed by a gpg encrypted git repo. Perfect for small use cases!
The only selfhosted github I know about is github enterprise.
If you just want to host git repos, gitea, and gitlab are good. You don't need that to host git though, git is peer based and doesn't require a fancy dashboard to work.