11.4 Configuring the Server for Gitosis
Gitosis requires two things in order to run on your server. It must have its own user on the server and a directory to store all your repositories.
Each operating system has a slightly different way for
adding new users. In most Linux distributions,
you can use the adduser
command.
Gitosis needs a new user on the system. Their home directory
is where Gitosis stores its configuration values and
its repositories. You can specify the home directory on most
Linux systems by adding
--home /path/to/home
.
The home path can be located anywhere on the system that you want.
The convention within Gitosis is to put it in
/srv/example.com/git
—changing
example.com out for your domain—but that
isn’t required.
Get Pragmatic Version Control Using Git now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.