setup_gitweb
Setup Gitweb server
Install
gitgitwebandhighlightEnable apache CGI modules and restart web server
sudo a2enmod cgi sudo systemctl restart apache2Update the Gitweb configs
/etc/gitweb.confAdded Project root to scan repositories
$projectroot = "/home/git/projects";Enable syntax highlighting
$feature{'highlight'}{'default'} = [1];Set project root
$projectroot = "/home/git/projects/";Set project list
$projects_list = "/home/git/projects.list";Take a look here for project list and save it in home directory
Visit here for more config details
Run the below command in project source root directory to explore your repository instantly in web-browser without adding to the config files
git instaweb --httpd=apache2 --browser=firefox --localIf you want to run in multiple session, randomize the port number as belowgit instaweb --httpd=apache2 --browser=firefox --local --port $[ $RANDOM % 1000 + 9000 ]'Explore your git repositories at http://localhost/gitweb
Troubleshooting:
Exec permission issue:
chmod +x /usr/share/gitweb/gitweb.cgiApache modules issues: Run
a2enmod cgianda2enmod perlCGIT not linked properly
sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/Sometimes noted that
/usr/share/gitwebdirectory is not created on reinstall
Last updated