Mrbytes
2012-09-12 c32a8c92a84df27a1ad8f798d2b3dcdf321fd27d
docs/00_index.mkd
@@ -1,127 +1,86 @@
## Overview
Git:Blit is an open-source, integrated pure Java stack for managing, viewing, and serving [Git][git] repositories.
Its designed primarily as a tool for small workgroups who want to host [Git][git] repositories on a Windows machine.
## What is Gitblit?
<div class="well" style="margin-left:5px;float:right;width:275px;padding: 10px 10px;">
<b>Current Release %VERSION% (%BUILDDATE%)</b> <a href="releases.html">changelog</a>
<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-success" href="http://code.google.com/p/gitblit/downloads/detail?name=%GO%">Download Gitblit GO</a></div>
<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-danger" href="http://code.google.com/p/gitblit/downloads/detail?name=%WAR%">Download Gitblit WAR</a></div>
<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-info" href="http://code.google.com/p/gitblit/downloads/detail?name=%EXPRESS%">Download Gitblit Express</a></div>
<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-primary" href="http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%">Download Gitblit Manager</a></div>
   <div style="text-align:center">
      <a href="http://code.google.com/p/gitblit/downloads/detail?name=%API%">Gitblit API</a> | <a href="http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%">Gitblit Federation Client</a>
      <br/>
      <a href="screenshots.html" title="Screenshots"><img style="margin-top:5px;border:1px solid #ccc;" src="thumbs/00.png" alt="Screenshots" /></a>
   </div>
Of course, since its pure Java it should run with any JVM on any platform, but there are already [many compelling Git solutions](https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools) for non-Windows environments.
### Current Version
   <div style="padding-top:5px;">
   <table class="table condensed-table">
      <tbody>
      <tr><th>License</th><td><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, version 2.0</a></td></tr>
      <tr><th>Sources</th><td><a href="http://github.com/gitblit">GitHub</a> &amp; <a href="http://code.google.com/p/gitblit/source/list">GoogleCode</a></td></tr>
      <tr><th>Issues</th><td><a href="http://code.google.com/p/gitblit/issues/list">GoogleCode</a></td></tr>
      <tr><th>Discussion</th><td><a href="http://groups.google.com/group/gitblit">Gitblit Group</a></td></tr>
      <tr><th>Google+</th><td><a href="https://plus.google.com/114464678392593421684">Gitblit+</a></td></tr>
      <tr><th>Ohloh</th><td><a target="_top" href="http://www.ohloh.net/p/gitblit"><img border="0" width="100" height="16" src="http://www.ohloh.net/p/gitblit/widgets/project_thin_badge.gif" alt="Ohloh project report for Gitblit" /></a></td></tr>
      <tr><th>Donations</th><td>If you enjoy Gitblit and want to support its development, please consider making a donation to <a href="http://www.helpmegivetostjude.org/gitblit">St. Jude Children's Research Hospital</a>.
      <a href="http://www.helpmegivetostjude.org/gitblit" alt="St. Jude Children's Research Hospital"><img style="padding-top:10px;" src="stjude_150x150.gif"/></a></td></tr>
      </tbody>
      </table>
   </div>
</div>
[{0}](http://gitblit.com/{1}) based on [{2}][jgit] &nbsp; (*{3}*)
Gitblit is an open-source, pure Java stack for managing, viewing, and serving [Git][git] repositories.
It's designed primarily as a tool for small workgroups who want to host centralized repositories.
sources @ [Github][gitbltsrc]
You can browse a live demo [here](https://demo-gitblit.rhcloud.com) hosted on [RedHat's OpenShift][rhcloud] cloud service.
### Design Principles
1. [KISS](http://en.wikipedia.org/wiki/KISS_principle)
2. Offer useful features for serving Git repositories.  If feature is complex, refer to #1.
3. All dependencies must be retrievable from a publicly accessible Maven repository.<br/>This is to ensure authenticity of dependencies and to keep the Git:Blit distribution svelte.
### GO: Single-Stack Solution
### Features
- Out-of-the-box integrated stack requiring minimal configuration
- JGit SmartHTTP servlet
- Browser and git client authentication
- Four repository access control configurations and a Read-Only flag
    <ul class='noBullets'>
    <li>![anonymous](blank.png) *Anonymous View, Clone & Push*</li>
    <li>![push](lock_go_16x16.png) *Authenticated Push*</li>
    <li>![clone](lock_pull_16x16.png) *Authenticated Clone & Push*</li>
    <li>![view](shield_16x16.png) *Authenticated View, Clone & Push*</li>
    <li>![freeze](cold_16x16.png) Freeze repository (i.e. deny push, make read-only)
    </ul>
- Gitweb inspired UI
- Administrators may create, edit, rename, or delete repositories through the web UI
- Administrators may create, edit, rename, or delete users through the web UI
- Repository Owners may edit repositories through the web UI
- Automatically generates a self-signed certificate for https communications
- Dates can optionally be displayed using the browser''s reported timezone
- Author and Committer email address display can be controlled
- Markdown view support
- Syntax highlighting
- Customizable regular expression handling for commit messages
- Single text file for server configuration
- Single text file for users configuration
- Simple repository stats and activity graph (uses Google Charts)
- Optional utility pages
    <ul class='noBullets'>
    <li>![docs](book_16x16.png) Docs page which enumerates all Markdown files within a repository</li>
    <li>![tickets](bug_16x16.png) Ticgit ticket pages *(based on last MIT release bf57b032 2009-01-27)*</li>
    </ul>
*Gitblit GO* is an integrated, single-stack solution based on Jetty.
### Limitations
- HTTP/HTTPS are the only supported protocols
- Access controls are not path-based, they are repository-based
- Only Administrators can create, rename or delete repositories
- Git:Blit is an integrated, full-stack solution.  There is no WAR build at this time.
You do not need Apache httpd, Perl, Git, or Gitweb.  Should you want to use some or all of those, you still can; Gitblit plays nice with the other kids on the block.
### Todo List
- Manual certificate generation with BouncyCastle
- User list with edit and delete links
- Review spots where Git:Blit can cache data instead of abusing the disk
    - stats
    - users.properties access
    - available repositories
    - etc
- Download zip feature
- Site documentation
- Code documentation
- Unit testing
This is what you should download if you want to go from zero to Git in less than 5 mins.
### Idea List
- Ticgit activity/timeline
- Ticgit query feature with paging support
- Ticgit ticket change history
- View images on Blob page
- View other binary files on Blob page
- Markdown editing feature
- Blame feature (waiting for the [JGit][jgit] team to do the hard part)
All dependencies are bundled.
### License
TBD
### WAR: For Your Servlet Container
*Gitblit WAR* is what you should download if you already have a servlet container available that you wish to use.  Jetty 6/7/8 and Tomcat 6/7 are known to work.  Generally, any Servlet 2.5 or Servlet 3.0 container should work.
### Inspirations
- [Gitweb](http://www.git-scm.com)
- [Fossil](http://www.fossil-scm.org)
All dependencies are bundled.
## Architecture
### Express: For the Cloud
*Gitblit Express* is a prepared distribution for [RedHat's OpenShift][rhcloud] cloud service.
![block diagram](architecture.png "Git Blit Architecture")
All dependencies are bundled.
### Bundled Dependencies
The following dependencies are bundled with the Git:Blit zip distribution file.
### You decide how to use Gitblit
- [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)
- [JavaService](http://forge.ow2.org/projects/javaservice) (BSD and LGPL)
- icons courtesy of [FatCow Hosting](http://www.fatcow.com/free-icons) (Creative Commons CC-BY)
- magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY)
Gitblit can be used as a dumb repository viewer with no administrative controls or user accounts.
Gitblit can be used as a complete Git stack for cloning, pushing, and repository access control.
Gitblit can be used without any other Git tooling (including actual Git) or it can cooperate with your established tools.
### Downloaded Dependencies
The following dependencies are automatically downloaded from the Apache Maven repository and from the Eclipse Maven repository when Git:Blit is launched for the first time.
### Easy Remote Management
- [JGit][jgit] (EDL 1.0)
- [Wicket](http://wicket.apache.org) (Apache 2.0)
- [WicketStuff GoogleCharts](https://github.com/wicketstuff/core/wiki/GoogleCharts) (Apache 2.0)
- [MarkdownPapers](http://markdown.tautua.org) (Apache 2.0)
- [Jetty](http://eclipse.org/jetty) (Apache 2.0, EPL 1.0)
- [SLF4J](http://www.slf4j.org) (MIT/X11)
- [Log4j](http://logging.apache.org/log4j) (Apache 2.0)
- [JCommander](http://jcommander.org) (Apache 2.0)
- [BouncyCastle](http://www.bouncycastle.org) (MIT/X11)
Administrators can create and manage all repositories, user accounts, and teams from the *Web UI*.
Administrators can create and manage all repositories, user accounts, and teams from the *JSON RPC interface* using the [Gitblit Manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) or your own custom tooling.
### Other Build Dependencies
- [Fancybox image viewer](http://fancybox.net) (MIT and GPL dual-licensed)
### Integration with Your Infrastructure
## Building
[Eclipse](http://eclipse.org) is recommended for development as the project settings are preconfigured.
- Groovy push hook scripts
- Pluggable user service mechanism
    - LDAP authentication with optional LDAP-controlled Team memberships
    - Custom authentication, authorization, and user management
- Rich RSS feeds
- JSON-based RPC mechanism
- [Java Client RSS/JSON API library](http://code.google.com/p/gitblit/downloads/detail?name=%API%) for custom integration
1. Clone the git repository from [Github][gitbltsrc].
2. Import the gitblit project into your Eclipse workspace.<br/>
*There will be lots of build errors.*
3. Using Ant, execute the `build.xml` script in the project root.<br/>
*This will download all necessary build dependencies and will also generate the Keys class for accessing settings.*
4. Select your gitblit project root and **Refresh** the project, this should correct all build problems.
5. Review the settings in `gitblit.properties` in your project root.<br/>
Make sure you set an appropriate value for *git.repositoriesFolder*.
6. Execute the *com.gitblit.Launcher* class to start Git:Blit.
### Backup Strategy
Gitblit includes a backup mechanism (*federation*) which can be used to backup repositories and, optionally, user accounts, team definitions, server settings, & Groovy push hook scripts from your Gitblit instance to another Gitblit instance or to a [Gitblit Federation Client](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%).  Similarly, you can use the federation mechanism to aggregate individual workspace Gitblit instances to a common, centralized server.
### Java Runtime Requirement
Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit (JDK).
[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
[git]: http://git-scm.com "Official Git Site"
[gitbltsrc]: http://somewhere.com "gitblit git repository"
[rhcloud]: https://openshift.redhat.com/app "RedHat OpenShift"