SetEnv GITWEB_CONFIG "/etc/gitweb.conf"
AddHandler cgi-script .cgi}}</li>
<li>Restart web server to enable the changes
{{Code|/etc/init.d/httpd restart;}}</li>
<li>Create web page to browse repository</li>
{{Code|cd /var/hda/web-apps/gitweb
chown -R git:git git
chmod 755 git}}</li>
<li>Create public SSH key storage
{{Code|cd /var/cache/git;
mkdir .ssh
chmod 700 .ssh
touch .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
chown -R git:git .ssh/}}</li>
<li>Create '''/etc/init.d/git''' file and add the following
{{Text|Text=#!/bin/sh
<li>Create repository
{{Code|cd /var/cache/git/
mkdir git init testcd test/var/cache/git initchown -R git:git ../test/}}</li><li>Add a short descriptionand test file{{Code|cd /var/cache/git/test/echo "test repo" > description}}</li>echo 'test' > READMEgit add READMEgit commit -m "initial README file"}}</li>
<li>Edit '''config''' and add the following at the bottom
{{Text|Text=[gitweb]
owner = Your Name}}</li>
<li>Create local repository and commit
{{Code|mkdir ~/test
cd ~/test && git init
echo 'test' > README
git add README
git commit -m "initial README file"}}</li>
<li>Create SSH rsa public key
{{Code|ssh-keygen -t rsa -C "user@yourisp.com"}}</li>
<li>Push to the repository
{{Code|git remote add origin user@hda.home.com:test
git push origin master}}</li>
<li>Add to bottom of '''/etc/gitweb.conf''' file
{{Text|Text=$feature{'blame'}{'default'} = [undef];
{{Code|cp -r /var/www/git/* html
chown -R apache:users html}}</li>
<li>Restart web server to enable the changes
{{Code|/etc/init.d/httpd restart;}}</li>
</ul>