Many developers use GitHub, GitLab and Bitbucket as repositories hosting, but sometimes there are restrictions imposed by these parties.
Creating your own Git server will make you more flexible and have full control over the repositories that you do without worrying about the restrictions imposed by companies such as GitHun and GitLab.
Here is how you can use it to setup a Git server. Good luck.
Source of shared Link