Git Administration

From Elvanör's Technical Wiki
Revision as of 06:53, 20 January 2021 by Elvanor (talk | contribs) (Created page with "= Setup on the server = * On Gentoo, just emerge dev-vcs/git and [https://wiki.gentoo.org/wiki/Git follow instructions there.] Basically, you create the git user, edit '''/et...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setup on the server

  • On Gentoo, just emerge dev-vcs/git and follow instructions there. Basically, you create the git user, edit /etc/conf.d/git-daemon and start git-daemon (I am not sure what git-daemon actually does).
  • To control access you must add SSH keys to the git user (since the home directory is in /var/git, edit /var/git/.ssh/authorized_keys).
  • You can then create empty Git repositories like this:
cd /srv/net.elvanor/git/repository-path
sudo -u git git init --bare

Cloning the repository on the client

  • Directly clone the repository on a client computer like this:
git clone ssh://git@brithombar.elvanor.net/srv/net.elvanor/git/repository-path