Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/res0nat0r/gitosis
Manage git repositories, provide access to them over SSH, with tight access control and not needing shell accounts.
https://github.com/res0nat0r/gitosis
git git-addons
Last synced: 3 months ago
JSON representation
Manage git repositories, provide access to them over SSH, with tight access control and not needing shell accounts.
- Host: GitHub
- URL: https://github.com/res0nat0r/gitosis
- Owner: res0nat0r
- License: gpl-2.0
- Created: 2008-10-02T15:58:49.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2017-02-21T22:24:33.000Z (over 7 years ago)
- Last Synced: 2024-07-27T17:58:44.980Z (3 months ago)
- Topics: git, git-addons
- Language: Python
- Homepage: http://eagain.net
- Size: 144 KB
- Stars: 1,320
- Watchers: 78
- Forks: 384
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- License: COPYING
Awesome Lists containing this project
README
==========================================================
``gitosis`` -- software for hosting ``git`` repositories
==========================================================Manage ``git`` repositories, provide access to them over SSH,
with tight access control and not needing shell accounts... note::
Documentation is still lacking, and non-default configurations
(e.g. config file, repositories, installing in a location that
is not in ``PATH``) basically have not been tested at all.
Basic usage should be very reliable -- the project has been
hosting itself for a long time. Any help is welcome.``gitosis`` aims to make hosting ``git`` repos easier and safer. It
manages multiple repositories under one user account, using SSH keys
to identify users. End users do not need shell accounts on the server,
they will talk to one shared account that will not let them run
arbitrary commands.``gitosis`` is licensed under the GPL, see the file ``COPYING`` for
more information.You can get ``gitosis`` via ``git`` by saying::
git clone git://github.com/res0nat0r/gitosis.git
And install it via::
python setup.py install
Though you may want to use e.g. ``--prefix=``. For Debian/Ubuntu
users, the source is debianized.Setting up
==========First, we will create the user that will own the repositories. This is
usually called ``git``, but any name will work, and you can have more
than one per system if you really want to. The user does not need a
password, but does need a valid shell (otherwise, SSH will refuse to
work). Don't use an existing account unless you know what you're
doing.I usually store ``git`` repositories in the subtree
``/srv/example.com/git`` (replace ``example.com`` with your own
domain). You may choose another location. Adjust to suit and run::sudo adduser \
--system \
--shell /bin/sh \
--gecos 'git version control' \
--group \
--disabled-password \
--home /srv/example.com/git \
gitThis command is known to work in Debian and Ubuntu. Your mileage may
vary. Under CentOS (and presumably RedHat) execute the
following commands as root instead::useradd \
-r \
-s /bin/sh \
-c 'git version control' \
-d /home/git \
gitmkdir -p /home/git
chown git:git /home/git
You will need an SSH public key to continue. If you don't have one,
you need to generate one. See the man page for ``ssh-keygen``, and you
may also be interested in ``ssh-agent``. Create it on your personal
computer, and protect the *private* key well -- that includes not
transferring it over the network.Next, we need to set things up for this newly-created user. The
following command will create a ``~/repositories`` that will hold the
``git`` repositories, a ``~/.gitosis.conf`` that will be a symlink to
the actual configuration file, and it will add the SSH public key to
``~/.ssh/authorized_keys`` with a ``command=`` option that restricts
it to running ``gitosis-serve``. Run::# sudo -iu git
git $ gitosis-init