This documention are aim to introduce how to make some git repo like title described. This may useful for users who not want to make repo on some online service like github or gitlab due to very expensive costs.
First of all you absolutely need a server with a public address and a package manager. In this article I got a server with CentOS Linux release 7.3.1611 (Core) and I'm root.
Root isn't always harmful especially if not on a production server but you are recommended to come with a long enough password to keep root safe. (Don't worry to lost it at most time - you can always reset password on the server's dashboard.)
And, SSH client. Personally recommend MobaXterm. Putty is okay but please don't download it on some bad guy's website like baidu/360. Just go to the official site and download it, you will be safe.