Skip to content

Commit cc04772

Browse files
committed
Documentation
1 parent cb78b89 commit cc04772

File tree

7 files changed

+153
-44
lines changed

7 files changed

+153
-44
lines changed

build.xml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -673,18 +673,24 @@
673673
<page name="screenshots" src="screenshots.mkd" />
674674
</menu>
675675
<menu name="documentation" pager="true" pagerPlacement="bottom" pagerLayout="justified">
676-
<page name="setup GO" src="setup_go.mkd" />
677-
<page name="upgrade GO" src="upgrade_go.mkd" />
676+
<menu name="Gitblit GO" pager="true" pagerPlacement="bottom" pagerLayout="justified">
677+
<page name="setup GO" src="setup_go.mkd" />
678+
<page name="upgrade GO" src="upgrade_go.mkd" />
679+
</menu>
678680
<divider />
679-
<page name="setup WAR" src="setup_war.mkd" />
680-
<page name="upgrade WAR" src="upgrade_war.mkd" />
681+
<menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
682+
<page name="setup WAR" src="setup_war.mkd" />
683+
<page name="upgrade WAR" src="upgrade_war.mkd" />
684+
</menu>
681685
<divider />
682-
<page name="administration" src="setup.mkd" />
686+
<page name="administration" src="administration.mkd" />
683687
<page name="authentication" src="setup_authentication.mkd" />
684688
<page name="push hooks" src="setup_hooks.mkd" />
685689
<page name="lucene indexing" src="setup_lucene.mkd" />
686690
<page name="reverse proxies" src="setup_proxy.mkd" />
687691
<divider />
692+
<page name="Gitblit as a viewer" src="setup_viewer.mkd" />
693+
<divider />
688694
<page name="git client setup" src="setup_client.mkd" />
689695
<divider />
690696
<page name="federation" src="federation.mkd" />
@@ -923,11 +929,30 @@
923929
<page name="features" src="features.mkd" />
924930
</menu>
925931
<menu name="documentation">
926-
<page name="setup" src="setup.mkd" />
932+
<menu name="Gitblit GO" pager="true" pagerPlacement="bottom" pagerLayout="justified">
933+
<page name="setup GO" src="setup_go.mkd" />
934+
<page name="upgrade GO" src="upgrade_go.mkd" />
935+
</menu>
936+
<divider />
937+
<menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
938+
<page name="setup WAR" src="setup_war.mkd" />
939+
<page name="upgrade WAR" src="upgrade_war.mkd" />
940+
</menu>
941+
<divider />
942+
<page name="administration" src="administration.mkd" />
943+
<page name="authentication" src="setup_authentication.mkd" />
944+
<page name="push hooks" src="setup_hooks.mkd" />
945+
<page name="lucene indexing" src="setup_lucene.mkd" />
946+
<page name="reverse proxies" src="setup_proxy.mkd" />
947+
<divider />
948+
<page name="Gitblit as a viewer" src="setup_viewer.mkd" />
949+
<divider />
950+
<page name="git client setup" src="setup_client.mkd" />
951+
<divider />
927952
<page name="federation" src="federation.mkd" />
928953
<divider />
929-
<page name="faq" src="faq.mkd" />
930954
<page name="settings" src="properties.mkd" />
955+
<page name="faq" src="faq.mkd" />
931956
<divider />
932957
<page name="design" src="design.mkd" />
933958
<page name="rpc" src="rpc.mkd" />

src/site/setup.mkd renamed to src/site/administration.mkd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ These permission codes are combined with the repository path to create a user pe
4848

4949
RW:mygroup/myrepo.git
5050

51+
**NOTE:**
52+
The following repository permissions are equivalent:
53+
54+
- myrepo.git
55+
- RW+:myrepo.git
56+
57+
This is to preserve backwards-compatibility with Gitblit <= 1.1.0 which granted rewind power to all access-permitted users.
58+
5159
#### Discrete Permissions with Regex Matching (Gitblit v1.2.0+)
5260

5361
Gitblit also supports *case-insensitive* regex matching for repository permissions. The following permission grants push privileges to all repositories in the *mygroup* folder.
@@ -171,14 +179,6 @@ There are four actual *roles* in Gitblit:
171179
- *#create*, which allows the user the power to create personal repositories
172180
- *#fork*, which allows the user to create a personal fork of an existing Gitblit-hosted repository
173181

174-
**NOTE:**
175-
The following repository permissions are equivalent:
176-
177-
- myrepo.git
178-
- RW+:myrepo.git
179-
180-
This is to preserve backwards-compatibility with Gitblit <= 1.1.0 which granted rewind power to all access-permitted users.
181-
182182
### Personal Repositories & Forks
183183

184184
Personal Repositories and Forks are related but are controlled individually.

src/site/faq.mkd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Value = <em>false</em></pre>
2121

2222
This is a long-standing, known bug in the native Git for Windows implementation.
2323

24-
https://groups.google.com/d/topic/msysgit/at8D7J-h7mw/discussion
24+
Please see [this thread](https://groups.google.com/d/topic/msysgit/at8D7J-h7mw/discussion) for details.
2525

2626
### Why can't I access Gitblit GO from another machine?
2727
1. Please check *server.httpBindInterface* and *server.httpsBindInterface* in `gitblit.properties`, you may be only be serving on *localhost*.
@@ -41,7 +41,7 @@ Run the server as *root* (security concern) or change the ports you are serving
4141
2. Confirm that the servlet container process has full read-write-execute permissions to your *git.repositoriesFolder*.
4242

4343
### Gitblit WAR will not authenticate any users?!
44-
Confirm that the &lt;context-param&gt; *realm.userService* value in your `web.xml` file actually points to a `users.conf` or `users.properties` file.
44+
Confirm that the &lt;context-param&gt; *realm.userService* value in your `web.xml` file actually points to a `users.conf` file.
4545

4646
### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my log/branch/tag/ref?!
4747
This is likely an url encoding/decoding problem with forward slashes:
@@ -125,9 +125,9 @@ Yes.
125125
Gitblit will run just fine with a JRE. Gitblit can optionally use `keytool` from the JDK to generate self-signed certificates, but normally Gitblit uses [BouncyCastle][bouncycastle] for that need.
126126

127127
### Does Gitblit use a database to store its data?
128-
No. Gitblit stores its repository configuration information within the `.git/config` file and its user information in `users.conf`, `users.properties`, or whatever filename is configured in `gitblit.properties`.
128+
No. Gitblit stores its repository configuration information within the `.git/config` file and its user information in `users.conf` or whatever filename is configured in `gitblit.properties`.
129129

130-
### Can I manually edit users.conf, users.properties, gitblit.properties, or .git/config?
130+
### Can I manually edit users.conf, gitblit.properties, or .git/config?
131131
Yes. You can manually manipulate all of them and (most) changes will be immediately available to Gitblit.<br/>Exceptions to this are noted in `gitblit.properties`.
132132

133133
**NOTE:**
@@ -176,4 +176,4 @@ Yes. Most messages are localized to a standard Java properties file.
176176
[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
177177
[git]: http://git-scm.com "Official Git Site"
178178
[mina]: http://mina.apache.org "Apache Mina"
179-
[bouncycastle]: http://bouncycastle.org "The Legion of the Bouncy Castle"
179+
[bouncycastle]: http://bouncycastle.org "The Legion of the Bouncy Castle"

src/site/roadmap.mkd

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
## Roadmap
22

33
This is not exactly a formal roadmap but it is a priority list of what might be implemented in future releases.
4-
This list is volatile.
4+
This list is volatile and may not reflect what will be in the next release.
55

6-
### TODO (high priority)
7-
8-
* Eclipse: create plugin to enumerate repositories and delegate cloning to EGit
9-
* Manager: support federation RPCs
10-
* Manager: redesign ref indicators in log, search, and activity views to support multiple local branches, remote branches, and tags
11-
12-
### TODO (medium priority)
13-
14-
* Gitblit: editable settings page in GO/WAR
15-
* Gitblit: Clone Repository feature (issue 5)
6+
* Integrate an SSH daemon to complete the transport trifecta: http/https, git, and ssh
7+
* GitHub-style Pull Requests or Gerrit-style Patchsets (issue 215)
8+
* Clone/Mirror Repository feature (issue 5)
169
* optional scheduled pulls
1710
* optional automatic push to origin/remotes?
1811
* optional manual push to origin/remotes?
19-
* Gitblit: Repository regex substitutions should be stored in .git/.config, not gitblit.properties
20-
21-
### IDEAS
22-
23-
* Gitblit: GitHub-style Pull Requests or Gerrit-style Patchsets
24-
* Gitblit: Re-use the EGit branch visualization table cell renderer as some sort of servlet
25-
* Gitblit: diff should highlight inserted/removed fragment compared to original line
26-
* Gitblit: respect Gerrit branch permissions
27-
* Gitblit: Consider creating more Git model objects and exposing them via the JSON RPC interface to allow inspection/retrieval of Git commits, Git trees, etc from Gitblit.
28-
* Gitblit: Blame coloring by author (issue 2)
12+
* Re-use the EGit branch visualization table cell renderer as some sort of servlet (issue 194)
13+
* Diff should highlight inserted/removed fragment compared to original line
14+
* Respect Gerrit branch permissions, if found (issue 36)
15+
* Repository regex substitutions should be stored in .git/.config, not gitblit.properties
16+
* Editable settings page in GO/WAR
17+
* Create Eclipse plugin to enumerate repositories and delegate cloning to EGit

src/site/setup_authentication.mkd

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Gitblit supports additional authentication mechanisms aside from it's internal o
88
* Windows authentication
99
* Redmine auhentication
1010
* Salesforce.com authentication
11+
* Servlet container authentication
1112

1213
### LDAP Authentication
1314
*SINCE 1.0.0*
@@ -77,25 +78,48 @@ You can start Gitblit GO with an in-memory LDAP server by specifying the *--ldap
7778

7879
### Windows Authentication
7980

81+
Windows authentication is based on the use of Waffle and JNA. It is known to work properly for authenticating against the local Windows machine, but it is unclear if it works properly with a domain controller and Active Directory. To use this service, your Gitblit server must be installed on a Windows machine.
82+
83+
realm.userService = com.gitblit.WindowsUserService
84+
realm.windows.defaultDomain =
85+
8086
### Redmine Authentication
8187

88+
You may authenticate your users against a Redmine installation as long as your Redmine install has properly enabled [API authentication](http://www.redmine.org/projects/redmine/wiki/Rest_Api#Authentication). This user service only supports user authentication; it does not support team creation based on Redmine groups. Redmine administrators will also be Gitblit administrators.
89+
90+
realm.userService = com.gitblit.RedmineUserService
91+
realm.redmine.url = http://example.com/redmine
92+
8293
### Salesforce.com Authentication
8394

95+
You may authenticate your users against Salesforce.com. You can require that user's belong to a particular organization by specifying a non-zero organization id.
96+
97+
realm.userService = com.gitblit.SalesforceUserService
98+
realm.salesforce.orgId = 0
99+
100+
### Container Authentication
101+
102+
If you are using the WAR variant and deploying into your own servlet container which has a pre-defined authentication mechanism protecting the Gitblit webapp, then you may instruct Gitblit to automatically create Gitblit accounts for container-authenticated user principals.
103+
104+
realm.container.autoCreateAccounts = true
105+
84106
## Custom Authentication
107+
85108
This is the simplest choice where you implement custom authentication and delegate all other standard user and team operations to one of Gitblit's user service implementations. This choice insulates your customization from changes in User and Team model classes and additional API that may be added to IUserService.
86109

87-
Please subclass [com.gitblit.GitblitUserService](https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/GitblitUserService.java) and override the *setup()* and *authenticate()* methods.
110+
Please subclass [com.gitblit.GitblitUserService](https://github.com/gitblit/gitblit/blob/master/src/main/java/com/gitblit/GitblitUserService.java) and override the *setup()* and *authenticate()* methods.
88111
Make sure to set the *serviceImpl* field in your *setup()* method.
89112

90113
You may use your subclass by specifying its fully qualified classname in the *realm.userService* setting.
91114

92115
Your subclass must be on Gitblit's classpath and must have a public default constructor.
93116

94117
### Custom Everything
95-
Instead of maintaining a `users.conf` or `users.properties` file, you may want to integrate Gitblit into an existing environment.
118+
119+
Instead of maintaining a `users.conf` file, you may want to integrate Gitblit into an existing environment.
96120

97121
You may use your own custom *com.gitblit.IUserService* implementation by specifying its fully qualified classname in the *realm.userService* setting.
98122

99123
Your user service class must be on Gitblit's classpath and must have a public default constructor.
100-
Please see the following interface definition [com.gitblit.IUserService](https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/IUserService.java).
124+
Please see the following interface definition [com.gitblit.IUserService](https://github.com/gitblit/gitblit/blob/master/src/main/java/com/gitblit/IUserService.java).
101125

src/site/setup_proxy.mkd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,27 @@ ProxyPreserveHost On
6565
4. Set *web.mountParameters=false* in `gitblit.properties` or `web.xml` this will use parameterized URLs.
6666
Alternatively, you can respecify *web.forwardSlashCharacter*.
6767

68+
### Controlling Advertised Repository URLs
69+
70+
In some reverse-proxy configurations you may be running Gitblit using an http interface with an https reverse-proxy proxy. This will lead to Gitblit generating incorrect repository urls.
71+
72+
You can control the url that Gitblit generates by setting X-Forwarded headers in your proxy server.
73+
74+
*X-Forwarded-Proto*://servername(:*X-Forwarded-Port*)(/*X-Forwarded-Context*)
75+
76+
---X:MEDIAWIKI---
77+
{| class="table table-bordered"
78+
! Header
79+
! Description
80+
|-
81+
| X-Forwarded-Port
82+
| The port to use in generated repository http/https urls
83+
|-
84+
| X-Forwarded-Proto
85+
| The protocol/scheme to use in generated repository http/https urls
86+
|-
87+
| X-Forwarded-Context
88+
| The context to use in generated repository http/https urls
89+
|}
90+
---X:MEDIAWIKI---
91+

src/site/setup_viewer.mkd

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Gitblit as a Viewer
2+
3+
Gitblit is designed to be a complete Git server solution, however you may already have a Git serving solution such as ssh+gitolite or Gerrit. For these scenarios, you may configure Gitblit to be just a repository viewer.
4+
5+
### Lock-down your Viewer
6+
7+
Here is an example configuration that disables all administration, all Git serving features, and requires an authenticated user to view anything.
8+
9+
git.repositoriesFolder = ${baseFolder}/git
10+
git.cacheRepositoryList = true
11+
git.searchRepositoriesSubfolders = true
12+
git.searchRecursionDepth = -1
13+
git.searchExclusions =
14+
git.daemonPort = 0
15+
git.enableGitServlet = false
16+
git.enableGarbageCollection = false
17+
git.defaultAccessRestriction = VIEW
18+
web.authenticateViewPages = true
19+
web.allowAdministration = false
20+
web.enableRpcServlet = false
21+
web.enableRpcManagement = false
22+
web.enableRpcAdministration = false
23+
web.allowForking = false
24+
25+
### Tomcat or Reverse-Proxy Servers
26+
27+
If you are running Gitblit on a Tomcat-based container you will likely run into forward-slash character troubles.
28+
29+
To resolve this either set:
30+
31+
web.mountParameters = false
32+
33+
or
34+
35+
web.forwardSlashCharacter = !
36+
37+
38+
### Advertised Repository Urls
39+
40+
You may also want to advertise repository urls for your other Git serving solution from Gitblit.
41+
42+
- *{0}* is the token for the repository name
43+
- *{1}* is the token for the username
44+
45+
The username is only practical if you have setup the account names for your other git serving solution to match the Gitblit account.
46+
47+
web.otherUrls = ssh://localhost/git/{0} git://localhost:29418/git/{0} https://{1}@localhost/r/{0}

0 commit comments

Comments
 (0)