Creating a git server for Windows

Good time of day.

The problem is this. It is necessary to make an analog of gitlab, but with a host on my PC. So that several programmers can work with the server using the git command functionality.

So far, there is such a problem that we do not have a domain and it is not expected yet. Plus, there is not enough knowledge and it is not quite clear where to go.

From attempts-we deployed gitlab on the linkus VM, but it worked only on the ip of the machine, the maximum that we achieved was that from my windows I I was able to log in to the web interface using the machine's ip address.

Then I deployed gogs, but again locally on localhost: 3000. Git works, but the second person can't connect(yes, I understand that locally) but we do not even have an idea how to podlkyuchitsya outside the locale, well, or with it, if there are no outs without a domain.

If we summarize all the paragraphs that are above, then the task is to make the server lie on machine 1 (windows) and any programmer can clone the repository over ssh or https to his machine, when the server on machine 1 is running.

According to the relevance of such an idea - we need to keep the collected project from the code + assets, but gitlab, hub, etc. do not have enough free storage, and there is no money for additional space yet

Actually, how and by what means can I do what I described above?

Thank you in advance for your answers and have a nice evening!

Author: CyberNoble, 2020-10-16

1 answers

It is logical that by specifying localhost, they will not be able to connect to your machine.

Let's see what you can do without spending extra money.

If they are in the same local network with you-let them specify the IP address of your machine and everything will work. If you do not want to specify the address , you either need to use the functionality of the router and write a convenient name for it (for example, mikrotik can do this (it certainly costs a little money) and like openwrt (and this is the firmware for most routers and free)). Search by the word dns server. In the gogs/gitea settings, you can specify "external name/base url" in the settings and the correct name will be shown to everyone.

If you want to connect from outside, then you need to do the following - on the router to forward the ports (you need at least for http and ssh, although you can do with http alone), as well as on any free server to assign your router a dns name (Google on the topic Free Dynamic DNS). Of course, the router must have a real external one address (it may cost a little money). Without it, it is much more difficult. But maybe. The same hamachi can help a lot. Or IPv6.

I think that the best option is to use a stand-alone machine, so as not to be dependent on one developer machine. I would use a regular raspberry pi or an old system kit.

 1
Author: KoVadim, 2020-10-16 18:45:08