mirror of
https://github.com/wahyd4/gitolite.git
synced 2026-08-09 04:55:55 +10:00
197 lines
7.9 KiB
HTML
197 lines
7.9 KiB
HTML
<head>
|
|
<style>
|
|
body { background: #fff; margin-left: 40px; font-size: 0.9em; font-family: sans-serif; max-width: 800px; }
|
|
h1 { background: #ffb; margin-left: -30px; border-top: 5px solid #ccc; }
|
|
h2 { background: #ffb; margin-left: -20px; border-top: 3px solid #ddd; }
|
|
h3 { background: #ffb; margin-left: -10px; }
|
|
h4 { background: #ffb; }
|
|
code { font-size: 1.1em; background: #ddf; }
|
|
pre { margin-left: 2em; background: #ddf; }
|
|
pre code { font-size: 1.1em; background: #ddf; }
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<p style="text-align:center">
|
|
<a href="master-toc.html">master TOC</a>
|
|
|
|
|
<a href="master-toc.html#install">chapter TOC</a>
|
|
</p>
|
|
|
|
|
|
<h1>gitolite installation</h1>
|
|
|
|
<p>(Note: git servers are most commonly used with ssh URLs, and this document
|
|
describes installing gitolite to support such usage. If your users prefer
|
|
http URLs, read <a href="http.html" title="how to setup gitolite to use smart http mode">this</a> to install gitolite to support "smart http").</p>
|
|
|
|
<p><a name="_installing_and_upgrading_gitolite"></a></p>
|
|
|
|
<h2>installing and upgrading gitolite</h2>
|
|
|
|
<p>This section tells you how to install/upgrade gitolite, without too much
|
|
background. Later sections have more details and troubleshooting info; please
|
|
read them before asking for help if you have problems.</p>
|
|
|
|
<p>A bare minimum gitolite setup has:</p>
|
|
|
|
<ul>
|
|
<li>a server</li>
|
|
<li>a "hosting user" on the server (a real Unix userid; we use "git" in this
|
|
document, although RPM/DEB installs use "gitolite")</li>
|
|
<li>a virtual "admin user" -- the user who sets up gitolite and configures it</li>
|
|
<li>the admin user's client or workstation, from which he does all his work</li>
|
|
</ul>
|
|
|
|
<p>Gitolite allows 3 methods of install. The two most common are (1) the
|
|
<strong>package method</strong>, used if you have a gitolite RPM or a DEB available, and
|
|
(2) the <strong>non-root method</strong> which is the preferred manual install mode. Less
|
|
commonly used is (3) the <strong>root method</strong>, which is useful if you plan to have
|
|
multiple "hosting users" on the same server.</p>
|
|
|
|
<p>These install methods are described in detail below. (<em>Once you finish the
|
|
install, read the <a href="admin.html" title="administering and running gitolite">admin document</a> to administer your gitolite
|
|
installation</em>).</p>
|
|
|
|
<h3>package method: <a href="rpmdeb.html" title="package method">Link</a></h3>
|
|
|
|
|
|
<h3>non-root method: <a href="nonroot.html" title="non-root method">Link</a></h3>
|
|
|
|
|
|
<h3>root method: <a href="root.html" title="root method">Link</a></h3>
|
|
|
|
|
|
<p><a name="upgrade"></a></p>
|
|
|
|
<h3>upgrading</h3>
|
|
|
|
<p>Upgrading is easy; you just re-run some of the same commands used for install.
|
|
These commands are clearly noted in the install instructions below.</p>
|
|
|
|
<p>However, if you've added any new hooks, you must also run the next step (the
|
|
<code>gl-setup</code> command), although this time you don't need to supply a pubkey
|
|
filename as an argument.</p>
|
|
|
|
<p><a name="insttrouble"></a></p>
|
|
|
|
<h2>if you run into trouble...</h2>
|
|
|
|
<p>If you run into trouble, please read the following sections. They have
|
|
background information that may help you, or additional steps you can take to
|
|
troubleshoot or fix the problem.</p>
|
|
|
|
<p><a name="_common_install_problems"></a></p>
|
|
|
|
<h3>common install problems</h3>
|
|
|
|
<p>The most common problem is usually ssh. Here are three facts of ssh:</p>
|
|
|
|
<ul>
|
|
<li>ssh is a pain</li>
|
|
<li>most people don't know ssh well enough</li>
|
|
<li>even people who think they do, don't</li>
|
|
</ul>
|
|
|
|
<p>Please read how <a href="gl_ssh.html" title="how gitolite uses ssh">gitolite uses ssh</a> and the <a href="sts.html" title="ssh troubleshooting">ssh
|
|
troubleshooting</a> documents before asking for help.</p>
|
|
|
|
<p>If you've tried multiple methods of install, you may have multiple copies of
|
|
the sources lying around. This could be a problem; see <a href="install.html#instpath" title="appendix a: PATH issues for gl-setup">appendix a</a>
|
|
for how to detect and deal with this.</p>
|
|
|
|
<p>If none of this works read the rest of this document, understand it as much as
|
|
you can, then ask for help.</p>
|
|
|
|
<p><a name="instnameconv"></a></p>
|
|
|
|
<h3>naming conventions used</h3>
|
|
|
|
<p>Throughout the documentation, we use "YourName" as the admin user, and his
|
|
workstation is called "client". The hosting user is "git", and the server is
|
|
called "server". <strong>Please substitute your values as needed</strong>.</p>
|
|
|
|
<p><strong>If you're using DEB or RPM</strong>, the installer creates a user called
|
|
"gitolite", so substitute that for "git" anywhere in the docs where the
|
|
"hosting user" is mentioned as "git".</p>
|
|
|
|
<p>Also, we often say "the rc file". This means <code>~/.gitolite.rc</code> on the server.
|
|
And when we say the "access control rules", or "conf file", or "config file",
|
|
we mean <code>conf/gitolite.conf</code> on your gitolite-admin clone.</p>
|
|
|
|
<h3>helpful background information: <a href="instbg.html" title="helpful background information">Link</a></h3>
|
|
|
|
|
|
<h3>requirements: <a href="instrequire.html" title="requirements">Link</a></h3>
|
|
|
|
|
|
<h3>getting the gitolite software: <a href="getgl__.html" title="getting the gitolite software">Link</a></h3>
|
|
|
|
|
|
<p><a name="_instappendices"></a></p>
|
|
|
|
<h2>appendixes</h2>
|
|
|
|
<p>The following sections have some miscellaneous information that does not
|
|
cleanly to fit anywhere else.</p>
|
|
|
|
<p><a name="instpath"></a></p>
|
|
|
|
<h3>appendix a: PATH issues for gl-setup</h3>
|
|
|
|
<p>If you've tried multiple methods of install, you may have multiple copies of
|
|
the sources lying around, and when you ran <code>gl-setup</code> it picked up the wrong
|
|
one. This might also happen if the directory you supplied as the first
|
|
argument to <code>gitolite/src/gl-system-install</code> is not even in the <code>$PATH</code>.</p>
|
|
|
|
<p>Run <code>su - git</code> then <code>which gl-setup</code> to see which it picked up. This is what
|
|
it should be for each method:</p>
|
|
|
|
<ul>
|
|
<li>RPM/DEB method: probably <code>/usr/bin</code></li>
|
|
<li>root method: the first argument to the <code>gitolite/src/gl-system-install</code> command (or
|
|
<code>/usr/local/bin</code> by default)</li>
|
|
<li>non-root method: the first argument to the <code>gitolite/src/gl-system-install</code> command
|
|
(or <code>$HOME/bin</code> by default)</li>
|
|
</ul>
|
|
|
|
<p>If this is not what you get, remove the partially installed or extraneous
|
|
sources, if any, and try again. Or fix your <code>$PATH</code>.</p>
|
|
|
|
<p>One situation that is not easy to solve is if the system admin installed
|
|
gitolite using the RPM/DEB or root methods, and you want to install a later
|
|
version using the non-root method. Since <code>/usr/bin</code> and <code>/usr/local/bin</code> are
|
|
usually earlier than <code>$HOME/bin</code> in the <code>$PATH</code>, you'll have to get creative.
|
|
Good luck.</p>
|
|
|
|
<p><a name="clean"></a></p>
|
|
|
|
<h3>appendix b: cleaning out a botched install</h3>
|
|
|
|
<p>When people have trouble installing gitolite, they often try to change a bunch
|
|
of things manually on the server. This usually makes things worse ;-) so
|
|
here's how to clean the slate.</p>
|
|
|
|
<ul>
|
|
<li>client-side
|
|
<ul>
|
|
<li>edit <code>~/.ssh/config</code> and delete the paragraph starting with <code>host
|
|
gitolite</code>, if present.</li>
|
|
<li>remove <code>~/gitolite-admin</code></li>
|
|
</ul></li>
|
|
<li>server-side
|
|
<ul>
|
|
<li>edit <code>~/.ssh/authorized_keys</code> and delete all lines between <code># gitolite
|
|
start</code> and <code># gitolite end</code> inclusive.</li>
|
|
<li>remove <code>~/.gitolite</code>, <code>~/.gitolite.rc</code> and
|
|
<code>~/repositories/gitolite-admin.git</code></li>
|
|
<li>depending on which install method you used, you may also need to clean
|
|
out all gitolite files from <code>/usr/local/bin</code> or <code>$HOME/bin</code>, and then
|
|
delete <code>/var/gitolite/conf</code> and <code>/var/gitolite/hooks</code> or
|
|
<code>$HOME/share/gitolite/conf</code> and <code>$HOME/share/gitolite/hooks</code></li>
|
|
</ul></li>
|
|
</ul>
|
|
|
|
<h3>appendix c: uninstalling gitolite completely: <a href="uninstall__.html" title="appendix c: uninstalling gitolite completely">Link</a></h3>
|
|
|