Gitweb installation in 5 minutes
I couldn’t really find an easy tutorial on getting Gitweb to work on a Mac, so I decided to write one.
The end result should be an interface like the one for the Linux Kernel.
Here are the steps that I used:
- Download the Git source. Gitweb comes with it.
- Unzip, and cd to the just downloaded source directory.
- Copy the files gitweb/git-logo.png, gitweb/git-favicon.png, gitweb/gitweb.css to a directory that your webserver can see. For example, on a Mac, someplace under ~/Sites/, say ~/Sites/gitweb.
- Enter:
- Copy the newly created gitweb/gitweb.cgi to your cgi script directory, on the Mac the defaulit one is /Library/WebServer/CGI-Executable.
make GITWEB_PROJECTROOT=”<user dir>/scm” \
GITWEB_CSS=”<user dir>/Sites/gitweb/gitweb.css” \
GITWEB_LOGO=”<user dir>/Sites/gitweb/git-logo.png” \
GITWEB_FAVICON=”<user dir>/Sites/gitweb/git-favicon.png” \
bindir=/usr/local/git/bin/ gitweb/gitweb.cgi
Where:
GITWEB_PROJECTROOT : is the directory that contains your git repository(s)
GITWEB_CSS etc. : is where you copied the files in step 3
bindir : is the directory that contains the git executable.
Now if you point your browswer to the gitweb.cgi file (e.g. “http://<host name>/cgi-bin/gitweb.cgi”), you should see the nice web interface in action.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.



Comments
No comments yet.
Leave a comment