Changes

From Amahi Wiki
Jump to: navigation, search
214 bytes added ,  04:41, 17 March 2012
<li>Set init script to run
{{Code|chmod 755 /etc/init.d/git;
chkconfig git on/etc/init.d/git start/sbin/chkconfig git on}}</li><li>Set User information (change '''user.name''' and '''user.email''' accordingly)</li>
{{Code|git config --global user.name "MyHDA"
git config --global user.email myhda@localhost}}</li><li>Create temporary repository
{{Code|cd /var/cache/git/
mkdir git init testcd testgit init}}</li>
<li>Add test file and a short description
{{Code|echo 'test' > README
git add README
git commit -a -m "initial README file"}}</li>git push origin master<li>Create local repositorysed -i '1d' {{Code|cd /var/cache/git/test​/git clone test test.git/descriptionecho 'Test Repo' >> /var/cache/cd test.git/test​/.git/descriptionpush origin master}}</li>
<li>Edit '''/var/cache/git/test/.git/config''' and add the following at the bottom (change '''MyHDA''' as desired)
{{Text|Text=[gitweb]
cp -r /var/www/git/* html
chown -R apache:users html/}}</li>
<li>Update local repository description
{{Code|cd /var/cache/git
sed -i '1d' test.git​/.git/description
echo 'Test Repo' >> test.git​/.git/description}}</li>
<li>Edit '''/etc/httpd/conf.d/git.conf''' and replace with this text
{{Text|Text=<Directory /var/hda/web-apps/gitweb/html>
RewriteRule (.*) gitweb.cgi/$1 [QSA,L]
</Directory>}}</li>
<li>Update permissions , remove temporary repository, and restart web server
{{Code|chown -R git.git /var/cache/git
rm -rf /var/cache/git/test
/etc/init.d/httpd restart}}</li>
</ul>
12,424

edits