Moxie
2014-10-28 584328285c5defcf59cb3fc11494f9f056be79c8
commit | author | age
48fe87 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
M 2 <html>
3 <head>
4 <!-- Begin Header -->
5 <title>Gitblit</title>
6 <meta charset="utf-8">
7 <meta name="ROBOTS" content="INDEX">
8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9 <meta name="viewport" content="width=device-width, initial-scale=1.0">
10         
11 <link rel="stylesheet" href="./bootstrap/css/bootstrap.css">
12 <link rel='shortcut icon' type='image/png' href='./gitblt-favicon.png' />
13 <link rel="stylesheet" href="./prettify/prettify.css" />
14 <!-- Google Plus Profile Page -->
15 <link rel="publisher" href="https://plus.google.com/114464678392593421684" />
16 <style type="text/css"> a.gpluspage { margin-top:3px;text-decoration: none; } </style>
17
18 <!-- Google Plus One -->
19 <link rel="canonical" href="http://gitblit.com" />
20 <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
21 <style type="text/css"> div.gplusone { margin-top:12px; } </style>
22
23 <script src="./prettify/prettify.js"></script>
24 <script src="./bootstrap/js/jquery.js"></script>
25 <script src="./bootstrap/js/bootstrap.min.js"></script>
26 </head>
27 <body onload='prettyPrint()'>        <!-- Navigation Bar -->
28         <div class="navbar navbar-fixed-top">
29             <div class="navbar-inner">
30                 <div class="container">
31                       <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
32                         <span class="icon-bar"></span>
33                         <span class="icon-bar"></span>
34                         <span class="icon-bar"></span>
35                       </a>
36                       <a class="brand" href="./"><img src="./gitblt_25_white.png" alt="Gitblit"></img></a>
37                     <div class="nav-collapse">
38                         <ul class="nav">
39                             <li class='dropdown'> <!-- Menu -->
40 <a class='dropdown-toggle' href='#' data-toggle='dropdown'>about<b class='caret'></b></a>
41 <ul class='dropdown-menu'>
42 <li><a href='index.html'>overview</a></li>
43 <li><a href='features.html'>features</a></li>
44 <li><a href='screenshots.html'>screenshots</a></li>
45 </ul></li> <!-- End Menu -->
46 <li class='dropdown'> <!-- Menu -->
47 <a class='dropdown-toggle' href='#' data-toggle='dropdown'>documentation<b class='caret'></b></a>
48 <ul class='dropdown-menu'>
49 <li class='dropdown-submenu'> <!-- Submenu -->
50 <a tabindex='-1' href='#'>Gitblit GO</a>
51 <ul class='dropdown-menu'>
52 <li><a href='setup_go.html'>setup GO</a></li>
53 <li><a href='upgrade_go.html'>upgrade GO</a></li>
54 </ul></li> <!-- End Submenu -->
55 <li class='divider'></li>
56 <li class='dropdown-submenu'> <!-- Submenu -->
57 <a tabindex='-1' href='#'>Gitblit WAR</a>
58 <ul class='dropdown-menu'>
59 <li><a href='setup_war.html'>setup WAR</a></li>
60 <li><a href='upgrade_war.html'>upgrade WAR</a></li>
61 </ul></li> <!-- End Submenu -->
62 <li class='divider'></li>
63 <li class='dropdown-submenu'> <!-- Submenu -->
64 <a tabindex='-1' href='#'>Server Configuration</a>
65 <ul class='dropdown-menu'>
66 <li><a href='administration.html'>administration</a></li>
67 <li><a href='setup_authentication.html'>authentication</a></li>
68 <li><a href='setup_hooks.html'>push hooks</a></li>
69 <li><a href='setup_lucene.html'>lucene indexing</a></li>
70 <li><a href='setup_proxy.html'>reverse proxies</a></li>
71 <li><a href='setup_clientmenus.html'>client app menus</a></li>
72 <li><a href='setup_bugtraq.html'>bugtraq</a></li>
73 <li><a href='setup_mirrors.html'>mirrors</a></li>
74 <li><a href='setup_scaling.html'>scaling</a></li>
75 <li class='divider'></li>
76 <li><a href='setup_viewer.html'>Gitblit as a viewer</a></li>
77 </ul></li> <!-- End Submenu -->
78 <li class='divider'></li>
79 <li class='dropdown-submenu'> <!-- Submenu -->
80 <a tabindex='-1' href='#'>Client Usage</a>
81 <ul class='dropdown-menu'>
82 <li><a href='setup_transport_http.html'>using HTTP/HTTPS</a></li>
83 <li><a href='setup_transport_ssh.html'>using SSH</a></li>
84 <li><a href='eclipse_plugin.html'>using the Eclipse plugin</a></li>
85 </ul></li> <!-- End Submenu -->
86 <li class='divider'></li>
87 <li class='dropdown-submenu'> <!-- Submenu -->
88 <a tabindex='-1' href='#'>Tickets</a>
89 <ul class='dropdown-menu'>
90 <li><a href='tickets_overview.html'>overview</a></li>
91 <li><a href='tickets_using.html'>using</a></li>
92 <li><a href='tickets_barnum.html'>barnum</a></li>
93 <li><a href='tickets_setup.html'>setup</a></li>
94 <li><a href='tickets_replication.html'>replication & advanced administration</a></li>
95 </ul></li> <!-- End Submenu -->
96 <li class='divider'></li>
97 <li class='dropdown-submenu'> <!-- Submenu -->
98 <a tabindex='-1' href='#'>Plugins</a>
99 <ul class='dropdown-menu'>
100 <li><a href='plugins_overview.html'>overview</a></li>
101 <li><a href='plugins_extensions.html'>extension points</a></li>
102 </ul></li> <!-- End Submenu -->
103 <li class='divider'></li>
104 <li><a href='federation.html'>federation</a></li>
105 <li class='divider'></li>
106 <li><a href='properties.html'>settings</a></li>
107 <li><a href='faq.html'>faq</a></li>
108 <li class='divider'></li>
109 <li><a href='design.html'>design</a></li>
110 <li><a href='rpc.html'>rpc</a></li>
111 </ul></li> <!-- End Menu -->
112 <li class='dropdown'> <!-- Menu -->
113 <a class='dropdown-toggle' href='#' data-toggle='dropdown'>releases<b class='caret'></b></a>
114 <ul class='dropdown-menu'>
115 <li><a href='releasenotes.html'>release notes</a></li>
116 <li><a href='releases.html'>release history</a></li>
117 <li class='divider'></li>
118 <li><a href='roadmap.html'>roadmap</a></li>
119 </ul></li> <!-- End Menu -->
120 <li class='dropdown'> <!-- Menu -->
121 <a class='dropdown-toggle' href='#' data-toggle='dropdown'>downloads<b class='caret'></b></a>
122 <ul class='dropdown-menu'>
584328 123 <li><a href='http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.zip'>Gitblit GO (Windows)</a></li>
M 124 <li><a href='http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz'>Gitblit GO (Linux/OSX)</a></li>
125 <li><a href='http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.war'>Gitblit WAR</a></li>
48fe87 126 <li class='divider'></li>
M 127 <li><a href='https://registry.hub.docker.com/u/jmoger/gitblit/'>Gitblit GO (Docker)</a></li>
128 <li class='divider'></li>
129 <li><a href='http://plugins.gitblit.com'>Plugins Registry</a></li>
130 <li class='divider'></li>
584328 131 <li><a href='http://dl.bintray.com/gitblit/releases/manager-1.6.2.zip'>Gitblit Manager</a></li>
M 132 <li><a href='http://dl.bintray.com/gitblit/releases/fedclient-1.6.2.zip'>Federation Client</a></li>
48fe87 133 <li class='divider'></li>
584328 134 <li><a href='http://dl.bintray.com/gitblit/releases/gbapi-1.6.2.zip'>API Library</a></li>
48fe87 135 <li class='divider'></li>
M 136 <li><a href='https://bintray.com/gitblit/releases/gitblit'>Bintray (1.4.0+)</a></li>
137 <li><a href='https://code.google.com/p/gitblit/downloads/list?can=1'>GoogleCode (pre-1.4.0)</a></li>
138 <li class='divider'></li>
139 <li><a href='http://gitblit.github.io/gitblit-maven'>Maven Repository</a></li>
140 </ul></li> <!-- End Menu -->
141 <li class='dropdown'> <!-- Menu -->
142 <a class='dropdown-toggle' href='#' data-toggle='dropdown'>links<b class='caret'></b></a>
143 <ul class='dropdown-menu'>
144 <li><a href='https://dev.gitblit.com'>dev.gitblit.com (self-hosted)</a></li>
145 <li class='divider'></li>
146 <li><a href='http://plugins.gitblit.com'>Plugins Registry</a></li>
147 <li class='divider'></li>
148 <li><a href='https://github.com/gitblit/gitblit'>Github</a></li>
149 <li><a href='http://code.google.com/p/gitblit/issues/list'>Issues</a></li>
150 <li><a href='http://groups.google.com/group/gitblit'>Discussion</a></li>
151 <li><a href='https://plus.google.com/114464678392593421684'>Google+</a></li>
152 <li><a href='https://twitter.com/gitblit'>Twitter</a></li>
153 <li><a href='http://www.ohloh.net/p/gitblit'>Ohloh</a></li>
584328 154 <li class='divider'></li>
M 155 <li><a href='https://vimeo.com/86164723'>Gitblit Tickets screencast</a></li>
156 <li><a href='https://asciinema.org/a/9342'>Gitblit SSH and Plugin Management asciicast</a></li>
157 <li><a href='http://episodes.gitminutes.com/2014/05/gitminutes-29-james-moger-on-gitblit.html'>GitMinutes #29: James Moger on Gitblit</a></li>
48fe87 158 <li class='divider'></li>
M 159 <li><a href='https://plus.google.com/+JamesMoger'>+JamesMoger</a></li>
160 <li><a href='https://twitter.com/JamesMoger'>@JamesMoger</a></li>
161 </ul></li> <!-- End Menu -->
162 <li class='divider-vertical'></li>
163 <li><a href='https://plus.google.com/114464678392593421684?prsrc=3' class='gpluspage'><img src='https://ssl.gstatic.com/images/icons/gplus-16.png' width='16' height='16 style='order: 0;'/></a></li><li><div class='gplusone'><g:plusone size='small' href='http://gitblit.com'></g:plusone></div></li>
164                         </ul>
165                     </div><!--/.nav-collapse -->
166                 </div>
167             </div>
168         </div><!-- end Navigation Bar -->
169 <div class='container'>
170 <!-- Begin Markdown -->
171 <h2 class="section" id='H1'><a href="#H1" class="sectionlink"><i class="icon-share-alt"> </i></a>Gitblit Configuration</h2>
172 <h3 class="section" id='H2'><a href="#H2" class="sectionlink"><i class="icon-share-alt"> </i></a>Administering Repositories</h3><p>Repositories can be created, edited, renamed, and deleted through the web UI. They may also be created, edited, and deleted from the command-line using real <a href="http://git-scm.com">Git</a> or your favorite file manager and text editor.</p><p>All repository settings are stored within the repository <code>.git/config</code> file under the <em>gitblit</em> section.</p>
173 <pre><code>[gitblit]
174     description = master repository
175     owner = james
176     useTickets = false
177     useDocs = true
178     showRemoteBranches = false
179     accessRestriction = clone
180     isFrozen = false
181     showReadme = false
182     federationStrategy = FEDERATE_THIS
183     isFederated = false
184     skipSizeCalculation = false
185     federationSets = 
186 </code></pre>
187 <h4 class="section" id='H3'><a href="#H3" class="sectionlink"><i class="icon-share-alt"> </i></a>Repository Names</h4><p>Repository names must be case-insensitive-unique but are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or <code>/ _ - . ~ +</code><br/><br/>Whitespace is illegal.</p><p>Repositories can be grouped within subfolders. e.g. <em>libraries/mycoollib.git</em> and <em>libraries/myotherlib.git</em></p><p>All repositories created with Gitblit are <em>bare</em> and will automatically have <em>.git</em> appended to the name at creation time, if not already specified. </p>
188 <h4 class="section" id='H4'><a href="#H4" class="sectionlink"><i class="icon-share-alt"> </i></a>Repository Owner</h4><p>The <em>Repository Owner</em> has the special permission of being able to edit a repository through the web UI. The Repository Owner is not permitted to rename the repository, delete the repository, or reassign ownership to another user.</p>
189 <h3 class="section" id='H5'><a href="#H5" class="sectionlink"><i class="icon-share-alt"> </i></a>Access Restrictions and Access Permissions</h3><p><img src="permissions_matrix.png"  alt="permissions matrix"/></p>
190 <h4 class="section" id='H6'><a href="#H6" class="sectionlink"><i class="icon-share-alt"> </i></a>Discrete Permissions (Gitblit v1.2.0+)</h4><p>Since v1.2.0, Gitblit supports more discrete permissions. While Gitblit does not offer a built-in solution for branch-based permissions like Gitolite, it does allow for the following repository access permissions:</p>
191 <ul>
192   <li><strong>V</strong> (view in web ui, RSS feeds, download zip)</li>
193   <li><strong>R</strong> (clone)</li>
194   <li><strong>RW</strong> (clone and push)</li>
195   <li><strong>RWC</strong> (clone and push with ref creation)</li>
196   <li><strong>RWD</strong> (clone and push with ref creation, deletion)</li>
197   <li><strong>RW+</strong> (clone and push with ref creation, deletion, rewind)</li>
198 </ul><p>These permission codes are combined with the repository path to create a user permission:</p>
199 <pre><code>RW:mygroup/myrepo.git
200 </code></pre><p><strong>NOTE:</strong><br/>The following repository permissions are equivalent:</p>
201 <ul>
202   <li>myrepo.git</li>
203   <li>RW+:myrepo.git</li>
204 </ul><p>This is to preserve backwards-compatibility with Gitblit &lt;= 1.1.0 which granted rewind power to all access-permitted users.</p>
205 <h4 class="section" id='H7'><a href="#H7" class="sectionlink"><i class="icon-share-alt"> </i></a>Discrete Permissions with Regex Matching (Gitblit v1.2.0+)</h4><p>Gitblit also supports <em>case-insensitive</em> regex matching for repository permissions. The following permission grants push privileges to all repositories in the <em>mygroup</em> folder.</p>
206 <pre><code>RW:mygroup/.*
207 </code></pre>
208 <h5 class="section" id='H8'><a href="#H8" class="sectionlink"><i class="icon-share-alt"> </i></a>Exclusions</h5><p>When using regex matching it may also be useful to exclude specific repositories or to exclude regex repository matches. You may specify the <strong>X</strong> permission for exclusion. The following example grants clone permission to all repositories except the repositories in mygroup. The user/team will have no access whatsoever to these repositories.</p>
209 <pre><code>X:mygroup/.*
210 R:.*
211 </code></pre>
212 <h5 class="section" id='H9'><a href="#H9" class="sectionlink"><i class="icon-share-alt"> </i></a>Order is Important</h5><p>The preceding example should suggest that order of permissions is important with regex matching. Here are the rules for determining the permission that is applied to a repository request:</p>
213 <ol>
214   <li>If the user is an admin or repository owner, then RW+</li>
215   <li>Else if user has an explicit permission, use that</li>
216   <li>Else check for the first regex match in user permissions</li>
217   <li>Else check for the HIGHEST permission from team memberships
218   <ol>
219     <li>If the team is an admin team, then RW+</li>
220     <li>Else if a team has an explicit permission, use that</li>
221     <li>Else check for the first regex match in team permissions</li>
222   </ol></li>
223 </ol>
224 <h4 class="section" id='H10'><a href="#H10" class="sectionlink"><i class="icon-share-alt"> </i></a>No-So-Discrete Permissions (Gitblit &lt;= v1.1.0)</h4><p>Prior to v1.2.0, Gitblit has two main access permission groupings: </p>
225 <ol>
226   <li>what you are permitted to do as an anonymous user</li>
227   <li><strong>RW+</strong> for any permitted user</li>
228 </ol>
229 <h4 class="section" id='H11'><a href="#H11" class="sectionlink"><i class="icon-share-alt"> </i></a>Committer Verification</h4><p>You may optionally enable committer verification which requires that each commit be committed by the authenticated user pushing the commits. i.e. If Bob is pushing the commits, Bob <strong>must</strong> be the committer of those commits.</p><p><strong>How is this enforced?</strong></p><p>Bob must properly set his <em>user.name</em> and <em>user.email</em> values for the repository to match his Gitblit user account <strong>BEFORE</strong> committing to his repository.</p><p><pre>[user &quot;bob&quot;]
230     displayName = Bob Jones
231     emailAddress = bob@somewhere.com
232 </pre></p>
233 <pre><code>git config user.name &quot;Bob Jones&quot;
234 git config user.email bob@somewhere.com 
235 </code></pre><p>or</p>
236 <pre><code>git config user.name bob
237 git config user.email bob@somewhere.com 
238 </code></pre><p>The committer email address is required to be identical. Display name or username can be used as the committer name.</p><p>All checks are case-insensitive.</p><p><strong>What about merges?</strong></p><p>You can not use fast-forward merges on your client when using committer verification. You must specify <em>--no-ff</em> to ensure that a merge commit is created with your identity as the committer. Only the first/left parent chain is traversed when verifying commits.</p>
239 <h4 class="section" id='H12'><a href="#H12" class="sectionlink"><i class="icon-share-alt"> </i></a>Reflog</h4><p>Gitblit v1.2.1 introduced an incomplete reflog mechanism which was completed in 1.3.0. All pushes to Gitblit are automatically logged on an orphan branch, <code>refs/meta/gitblit/reflog</code>. If this ref exists, the reflog page link will be displayed on the repository pages.</p><p>This reflog is similar to, but not the same as, the normal Git reflog. The Gitblit reflog links Gitblit accounts to ref changes and because it is stored on an orphan branch, the reflog is portable by the federation mechanism or by a normal <code>git clone --mirror</code> command.</p>
240 <h3 class="section" id='H13'><a href="#H13" class="sectionlink"><i class="icon-share-alt"> </i></a>Teams</h3><p>Teams have assigned users and assigned repositories. A user can be a member of multiple teams and a repository may belong to multiple teams. This allows the administrator to quickly add a user to a team without having to keep track of all the appropriate repositories. </p>
241 <h3 class="section" id='H14'><a href="#H14" class="sectionlink"><i class="icon-share-alt"> </i></a>Administering Users</h3><p>All users and permissions are stored in the <code>users.conf</code> file. Your file extension must be <em>.conf</em> in order to use this user service.</p><p>The <code>users.conf</code> file uses a Git-style configuration format:</p>
242 <pre><code>[user &quot;admin&quot;]
243     password = admin
244     role = &quot;#admin&quot;
245     role = &quot;#notfederated&quot;
246     repository = RW+:repo1.git
247     repository = RW+:repo2.git
248
249 [user &quot;hannibal&quot;]
250     password = bossman
251     repository = RWD:topsecret.git
252     repository = RW+:ateam/[A-Za-z0-9-~_\\./]+
253
254 [user &quot;faceman&quot;]
255     password = vanity
256
257 [user &quot;murdock&quot;]
258     password = crazy     
259
260 [user &quot;babaracus&quot;]
261     password = grrrr
262
263 [team &quot;ateam&quot;]
264     user = hannibal
265     user = faceman
266     user = murdock
267     user = babaracus
268     repository = RW:topsecret.git
269     mailingList = list@ateam.org
270     postReceiveScript = sendmail
271 </code></pre><p>The <code>users.conf</code> file allows flexibility for adding new fields to a UserModel object without imposing the complexity of relying on an embedded SQL database. </p>
272 <h3 class="section" id='H15'><a href="#H15" class="sectionlink"><i class="icon-share-alt"> </i></a>Usernames</h3><p>Usernames must be unique and are case-insensitive.<br/>Whitespace is illegal.</p>
273 <h3 class="section" id='H16'><a href="#H16" class="sectionlink"><i class="icon-share-alt"> </i></a>Passwords</h3><p>User passwords are CASE-SENSITIVE and may be <em>plain</em>, <em>md5</em>, or <em>combined-md5</em> formatted (see <code>gitblit.properties</code> -&gt; <em>realm.passwordStorage</em>).</p>
274 <h3 class="section" id='H17'><a href="#H17" class="sectionlink"><i class="icon-share-alt"> </i></a>User Roles</h3><p>There are four actual <em>roles</em> in Gitblit:</p>
275 <ul>
276   <li><em>#admin</em>, which grants administrative powers to that user for all repositories, users, and teams</li>
277   <li><em>#notfederated</em>, which prevents an account from being pulled by another Gitblit instance</li>
278   <li><em>#create</em>, which allows the user the power to create personal repositories</li>
279   <li><em>#fork</em>, which allows the user to create a personal fork of an existing Gitblit-hosted repository</li>
280 </ul>
281 <h3 class="section" id='H18'><a href="#H18" class="sectionlink"><i class="icon-share-alt"> </i></a>Personal Repositories & Forks</h3><p>Personal Repositories and Forks are related but are controlled individually.</p>
282 <h4 class="section" id='H19'><a href="#H19" class="sectionlink"><i class="icon-share-alt"> </i></a>Creating a Personal Repository</h4><p>A user may be granted the power to create personal repositories by specifying the <em>#create</em> role through the web ui or through the RPC mechanism via the Gitblit Manager. Personal repositories are exactly like common/shared repositories except that the owner has a few additional administrative powers for that repository, like rename and delete.</p>
283 <h4 class="section" id='H20'><a href="#H20" class="sectionlink"><i class="icon-share-alt"> </i></a>Creating a Fork</h4><p>A user may also be granted the power to fork an existing repository hosted on your Gitblit server to their own personal clone by specifying the <em>#fork</em> role through the web ui or via the Gitblit Manager.</p><p>Forks are mostly likely personal repositories or common/shared repositories except for two important differences:</p>
284 <ol>
285   <li>Forks inherit a view/clone access list from the origin repository.<br/>i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration.</li>
286   <li>Forks are always listed in the fork network, regardless of any access restriction set on the fork.<br/>In other words, if you fork <em>RepoA.git</em> to <em>~me/RepoA.git</em> and then set the access restriction of <em>~me/RepoA.git</em> to <em>Authenticated View, Clone, &amp; Push</em> your fork will still be listed in the fork network for <em>RepoA.git</em>.</li>
287 </ol><p>If you really must have an invisible fork, the clone it locally, create a new personal repository for your invisible fork, and push it back to that personal repository.
288 <!-- End Markdown -->
584328 289 <div ><ul class="pager"> <li class="next"><a href="setup_authentication.html">authentication &rarr;</a></li></ul></div><footer class="footer"><p class="pull-right">generated 2014-10-28</p>
48fe87 290 <p>The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.</p>
M 291 </footer>
292 </div>
293 <!-- Google Analytics -->
294 <script type="text/javascript">
295     var _gaq = _gaq || [];
296     _gaq.push(['_setAccount', 'UA-24377072-1']);
297     _gaq.push(['_trackPageview']);
298
299     (function() {
300         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
301         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
302         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
303     })();
304 </script>
305
306 </body>
307 </html>