Even if you only use the self-hosted repository for a portion of your code, you'll be happy to have this option.
Gogues is probably one of the easiest local code repositories you will find. This option is cross-platform and can run on any Go-compatible platform (such as Linux, macOS, Windows, and ARM).
Gogs' feature set includes code review, bug tracking, wikis, and private/personal branches. Gogs uses the Git version control system, so it easily integrates into your git-based workflow.
Gogs is open source, free, and can be run from a single binary, deployed with Docker or Vagrant, or installed via a platform-specific package.
Conclusion
Hosting your own software repository is not a big challenge. And the control you get when using a third-party solution is worth the effort you'll put in to get one of these options up and running. And even if you only use the self-hosted repository for a portion of your code, you'll be happy to have that option.
Source: BairesDev