Information Technology Reference
In-Depth Information
How It Works
The latest version of cgit is always available at:
http://git.zx2c4.com/cgit/
The sources of cgit include a source code of git. This is done with submodules . The
switch --recurse-submodules clones the repository and all submodules. Unfor-
tunately, the --depth 1 option is not used for submodules. The cloning of git
sources in this recipe will last much longer than in Recipe 11-3.
The configuration file /etc/gitrc allows easy configuration of URLs for clon-
ing. This type of URL is visible in the lower part of Figure 11-3 . If you want to use cgit
with ssh and git daemon, try the following configuration:
clone-prefix=ssh://vagrant@localhost:2222/pub/git git
://localhost/git
11-10. Working with gitolite
Problem
You want to set up git hosting for your organization using ssh and gitolite. This will
give you the ability to grant access using three different rights:
• Read
• Write
• Forced write
Each of these rights can be assigned on a per user, per repository, and per branch
basis.
Your task in this recipe is to set up a virtual machine for hosting git repositories over
ssh with gitolite. You want to create two gitolite accounts: admin and peter and one re-
pository abc. Admin will be the administrator and peter will be ordinary user. Using the
administrator's account you will set the following privileges for peter:
• Branch a —read/write access with forced pushes
Search WWH ::




Custom Search