Middlebury

Difference between revisions of "Gitolite"

m (moved Gitosis to Gitolite: Using new software)
(Updated content for gitolite.)
Line 1: Line 1:
Gitosis is the system that hosts the central Git code repositories for the Web Application development group. This page documents how to work with the system.
+
Gitolite is the system that hosts the central Git code repositories for the Web Application development group. This page documents how to work with the system.
  
 
= Clone a repository =
 
= Clone a repository =
Line 6: Line 6:
 
If you get a password prompt like <pre>git@chisel.middlebury.edu's password:</pre> it means that there was an error authenticating your SSH keys. You should not be prompted for a password for git@chisel.
 
If you get a password prompt like <pre>git@chisel.middlebury.edu's password:</pre> it means that there was an error authenticating your SSH keys. You should not be prompted for a password for git@chisel.
  
= Gitosis Administration =
+
= Gitolite Administration =
 
== Granting access to a new machine ==
 
== Granting access to a new machine ==
 
On the remote machine:
 
On the remote machine:
Line 13: Line 13:
  
 
On chisel:
 
On chisel:
3. Check-out the Gitosis configuration: <pre>git clone git@chisel.middlebury.edu:gitosis-admin.git</pre>
+
3. Check-out the Gitolite configuration: <pre>git clone git@git.middlebury.edu:gitolite-admin.git</pre>
<pre>cd gitosis-admin/</pre>
+
<pre>cd gitolite-admin/</pre>
 
4. Put the contents of the public key into a file in the <code>keydir/</code> subdirectory:
 
4. Put the contents of the public key into a file in the <code>keydir/</code> subdirectory:
<pre>vim keydir/account@machine.pub</pre>
+
<pre>vim keydir/account/machine/account.pub</pre> where "account" is the person's AD username.
5. Add the key file-name (without the <code>.pub</code> extension to the <code>gitosis.conf</code> file in either a readonly or writable group.
+
5. Add the username to the <code>conf/gitolite.conf</code> file in either a readonly or writable group.
<pre>vim gitosis.conf</pre>
+
<pre>vim conf/gitolite.conf</pre>
6. Commit the config changes and push them back to Gitosis:
+
6. Commit the config changes and push them back to Gitolite:
 
<pre>git add .
 
<pre>git add .
git commit -m "Added key for machinename."
+
git commit -m "Added key for username's machinename."
 
git push</pre>
 
git push</pre>
  
 
[[Category:Web Application Development]]
 
[[Category:Web Application Development]]

Revision as of 10:20, 29 April 2014

Gitolite is the system that hosts the central Git code repositories for the Web Application development group. This page documents how to work with the system.

Clone a repository

git clone git@chisel.middlebury.edu:repository_name.git

If you get a password prompt like

git@chisel.middlebury.edu's password:

it means that there was an error authenticating your SSH keys. You should not be prompted for a password for git@chisel.

Gitolite Administration

Granting access to a new machine

On the remote machine:

1. Create an SSH key if one doesn't exist:

ssh-keygen

2. Copy the ~/.ssh/id_rsa.pub contents (being sure to elimiate any new-lines).

On chisel:

3. Check-out the Gitolite configuration:

git clone git@git.middlebury.edu:gitolite-admin.git
cd gitolite-admin/

4. Put the contents of the public key into a file in the keydir/ subdirectory:

vim keydir/account/machine/account.pub

where "account" is the person's AD username.

5. Add the username to the conf/gitolite.conf file in either a readonly or writable group.

vim conf/gitolite.conf

6. Commit the config changes and push them back to Gitolite:

git add .
git commit -m "Added key for username's machinename."
git push