P
P
Petr Volkhanov2014-01-22 15:48:45
git
Petr Volkhanov, 2014-01-22 15:48:45

We raise GIT on our domain and server?

Good afternoon. We have a domain like git.site.com and a server running Ubuntu Server 13.10. The server is behind a Netgear JNR-3210 router on the local network. What algorithm of actions needs to be performed in order to raise the GIT server so that any employee of our company can use the GIT server from the Internet, as well as from the local network (now the router distributes ip addresses automatically)?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Stanislav Lomadurov, 2014-01-22
@lomadurov

GitLab is here to help. In short, my little github. Debian/Ubuntu quick setup
guide

R
Ruslan Kasymov, 2014-01-22
@HDAPache

set up a GIT server so that any employee of our company can from the Internet, as well as from the local network

For the git:// protocol to work outside, you need to forward the ssh port on the gateway.

V
Vlad Zhivotnev, 2014-01-22
@inkvizitor68sl

> for the git://
protocol to work For the git protocol to work, you need to forward port 9418
The git+ssh protocol works on ssh.
> What algorithm of actions needs to be performed in order to raise the GIT server so that any employee of our company can
0) check that there is access from the internal network to the external ip-address of the router (there are millions of routers that do not allow access from their network to their external interface). If not, make a router from ubuntu ( https://debian.pro/249 ), turn off dhcp on the router, connect the router with a lan port to the server. Well, or just look for a new router.
1) on bubuntu apt-get install git; adduser gituser; sugituser; mkdir gitrepo; cd gitrepo; git init; git config --bool core.bare true
2) if point 0 works with the router, then forward ports 22 or 9418 (depending on the selected protocol) to the outside
3) git.domain.tld through A record hang on the ip-address of this whole structure.
4) add to /home/gituser/.ssh/authorized_keys the public keys of those who will work with the repository.
This is in its simplest form. Items 2 and 4 to taste, replace with dances from gitolite / corporate github / gitlab / etc.

R
Ruslan Kasymov, 2014-01-22
@HDAPache

Also interested in the question - which folder is better to choose for the GIT repository /var/www or /home/user/.git? Or does it not matter at all?

It doesn't matter, the main thing is not /dev/null :D

D
DancingOnWater, 2014-01-22
@DancingOnWater

smoking mans by gitolite

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question