Paul Martin
2016-04-30 a502d96a860456ec5e8c96761db70f7cabb74751
src/site/setup_go.mkd
@@ -1,16 +1,15 @@
## Gitblit GO Installation & Setup
1. Download and unzip Gitblit GO [${project.releaseVersion} (Windows)](%GCURL%gitblit-${project.releaseVersion}.zip) or [${project.releaseVersion} (Linux/OSX)](%GCURL%gitblit-${project.releaseVersion}.tar.gz).  
*Its best to eliminate spaces in the path name.*
*It is best to eliminate spaces in the path name.*
2. The server itself is configured through a simple text file.
Open `data/gitblit.properties` in your favorite text editor and make sure to review and set:
    - *server.httpPort* and *server.httpsPort*
    - *server.storePassword*
    - *server.storePassword* (do not enter *#* characters)
    **https** is strongly recommended because passwords are insecurely transmitted form your browser/git client using Basic authentication!
    - *git.packedGitLimit* (set larger than the size of your largest repository)
    - *git.streamFileThreshold* (set larger than the size of your largest committed file)
3. Execute `authority.cmd` or `java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data` from a command-line
**NOTE:** The Authority is a Swing GUI application.  Use of this tool is not required as Gitblit GO will startup and create SSL certificates itself, BUT use of this tool allows you to control the identification metadata used in the generated certificates.  Skipping this step will result in certificates with default metadata.
**NOTE:** The Authority is a Swing GUI application.  Use of this tool is not required as Gitblit GO will startup and create SSL certificates itself, BUT use of this tool allows you to control the identification metadata used in the generated self-signed certificates.  Skipping this step will result in certificates with default metadata.
    1. fill out the fields in the *new certificate defaults* dialog
   2. enter the store password used in *server.storePassword* when prompted.  This generates an SSL certificate for **localhost**.
   3. you may want to generate an SSL certificate for the hostname or ip address hostnames you are serving from
@@ -27,6 +26,15 @@
If you are deploying Gitblit to a *nix platform, you might consider moving the data folder out of the GO installation folder and then creating a symlink named "data" that points to your moved folder.
#### Specifying baseFolder via GITBLIT_HOME
You can specify `GITBLIT_HOME` either as an environment variable or as a `-DGITBLIT_HOME` JVM system property.
### Including Other Properties
SINCE 1.7.0
Gitblit supports loading it's settings from multiple properties files.  You can achieve this using the `include=filename` key.  This setting supports loading multiple files using a *comma* as the delimiter.  They are processed in the order defined and they may be nested (i.e. your included properties may include properties, etc, etc).
### Creating your own Self-Signed SSL Certificate
Gitblit GO (and Gitblit Certificate Authority) automatically generates a Certificate Authority (CA) certificate and an ssl certificate signed by this CA certificate that is bound to *localhost*.
@@ -38,6 +46,8 @@
   Reason: https:/myserver.com/git/myrepo.git: cannot open git-upload-pack
If you want to serve your repositories to another machine over https then you will want to generate a new certificate for the hostname or ip address you are serving from.
**NOTE:** The Gitblit Authority is a GUI tool and will require X11 forwarding on headless UNIX boxes.
1. `authority.cmd` or `java -jar authority.jar --baseFolder data`
2. Click the *new ssl certificate* button (red rosette in the toolbar in upper left of window)
@@ -117,13 +127,14 @@
    --baseFolder           The default base folder for all relative file reference settings
    --repositoriesFolder   Git Repositories Folder
    --userService          Authentication and Authorization Service (filename or fully qualified classname)
    --useNio               Use NIO Connector else use Socket Connector.
    --httpPort             HTTP port for to serve. (port <= 0 will disable this connector)
    --httpsPort            HTTPS port to serve.  (port <= 0 will disable this connector)
    --ajpPort              AJP port to serve.  (port <= 0 will disable this connector)
    --sshPort              SSH Daemon port to serve.  (port <= 0 will disable this daemon)
    --gitPort              Git Daemon port to serve.  (port <= 0 will disable this daemon)
    --alias                Alias in keystore of SSL cert to use for https serving
    --storePassword        Password for SSL (https) keystore.
    --shutdownPort         Port for Shutdown Monitor to listen on. (port <= 0 will disable this monitor)
   --dailyLogFile         Redirect logging to a rolling, daily log file instead of stdout
    --tempFolder           Folder for server to extract built-in webapp
    
**Example**
@@ -135,6 +146,6 @@
You can override Gitblit GO's default Log4j configuration with a command-line parameter to the JVM.
    java -Dlog4j.configuration=file:///home/james/log4j.properties -jar gitblit.jar <optional_gitblit_args>
For reference, here is [Gitblit's default Log4j configuration](https://github.com/gitblit/gitblit/blob/master/src/log4j.properties).  It includes some file appenders that are disabled by default.
You can not use override the default log4j configuration *AND* specify the `--dailyLogFile` parameter.  For reference, here is [Gitblit's default Log4j configuration](https://github.com/gitblit/gitblit/blob/master/src/log4j.properties).  It includes some file appenders that are disabled by default.