commit | author | age
|
cc0477
|
1 |
## Gitblit as a Viewer
|
JM |
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}
|