![]() I put them in a “static” subfolder of the repository folder, but you can put them anywhere. and then fix up a bug where the base URL doesn't have a trailing slash.Ĭopy gitweb’s static resources to your web server. # Don't want to get the site suspended, or have it lag! # Turn off search features, to limit potential CPU usage. # My server doesn't actually put git in /usr/bin, # we don't need to hardcode a path to find the repositories! # Since we've put gitweb.cgi in with the repositories, This is the point where you do have to read through gitweb.cgi to find out what configuration options are available. I know normally we’d put it somewhere else and have the web server automatically invoke it when accessing the repository URL, but we may not get that kind of control on a shared hosting plan! And as you’ll see soon, this simplifies the next step.Ĭonfigure gitweb with an adjacent gitweb_config.perl file. I generated it from the git sources’ master branch on using make bindir=/usr/bin gitweb, saving all my customization for the next step.Īnyway, the important point is to put gitweb.cgi in with the rest of your stuff. So here: you can download the version of gitweb.cgi that I’m using, and configure it yourself. What they don’t mention is that pretty much everything you’d customize by generating it yourself is already customizable with a config file. According to the Git Book, you’re supposed to grab the latest sources and generate a custom version of the script yourself. ![]() You can make a new subdomain or a new subfolder if you want, but the main thing here is that the server-side repositories are going to be served up by your web server as static content, so it has to be somewhere that your hosting plan lets you put website files. What worked for meĭecide where you want the git repositories. So it took me a while to figure out the configuration to use. (You can read “a CGI script” as “an executable that you can drop into your web server to generate content based on requests”.) But the documentation is geared towards people who have control over their whole web server, and right now I’m just on a shared hosting plan. ![]() Now, I found out that git comes with a CGI script to do this, called gitweb. Notably absent: I don’t care about pushing over HTTPS. Visiting the repo in a web browser gives some “pretty” way to browse the source.Anybody can clone over HTTP(S) (using the usual git clone).In all cases so far, I’m the only author, even. After all, these aren’t big collaborative projects they’re “just” projects whose revision history I’m willing to share. I did get a few recommendations for other places to host Git repositories, but-at least partly inspired by Tom Ryder’s “ Why Not GitHub?”-I decided to take the plunge and set up my own hosting. In my last post I talked about how I was disappointed I wouldn’t be able to post my toy projects on GitHub, since GitHub supports ICE. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |