Blame


1 257add31 2020-09-09 stsp .\"
2 257add31 2020-09-09 stsp .\" Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
3 257add31 2020-09-09 stsp .\"
4 257add31 2020-09-09 stsp .\" Permission to use, copy, modify, and distribute this software for any
5 257add31 2020-09-09 stsp .\" purpose with or without fee is hereby granted, provided that the above
6 257add31 2020-09-09 stsp .\" copyright notice and this permission notice appear in all copies.
7 257add31 2020-09-09 stsp .\"
8 257add31 2020-09-09 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 257add31 2020-09-09 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 257add31 2020-09-09 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 257add31 2020-09-09 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 257add31 2020-09-09 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 257add31 2020-09-09 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 257add31 2020-09-09 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 257add31 2020-09-09 stsp .\"
16 257add31 2020-09-09 stsp .Dd $Mdocdate$
17 257add31 2020-09-09 stsp .Dt GOT.CONF 5
18 257add31 2020-09-09 stsp .Os
19 257add31 2020-09-09 stsp .Sh NAME
20 257add31 2020-09-09 stsp .Nm got.conf
21 257add31 2020-09-09 stsp .Nd Game of Trees configuration file
22 257add31 2020-09-09 stsp .Sh DESCRIPTION
23 257add31 2020-09-09 stsp .Nm
24 257add31 2020-09-09 stsp is the run-time configuration file for
25 257add31 2020-09-09 stsp .Xr got 1 .
26 257add31 2020-09-09 stsp .Pp
27 50b0790e 2020-09-11 stsp .Nm
28 50b0790e 2020-09-11 stsp may be present in the root directory of a Git repository for
29 50b0790e 2020-09-11 stsp repository-wide settings, or in the
30 50b0790e 2020-09-11 stsp .Pa .got
31 50b0790e 2020-09-11 stsp meta-data directory of a work tree to override repository-wide
32 50b0790e 2020-09-11 stsp settings for
33 50b0790e 2020-09-11 stsp .Xr got 1
34 50b0790e 2020-09-11 stsp commands executed within this work tree.
35 50b0790e 2020-09-11 stsp .Pp
36 257add31 2020-09-09 stsp The file format is line-based, with one configuration directive per line.
37 257add31 2020-09-09 stsp Any lines beginning with a
38 257add31 2020-09-09 stsp .Sq #
39 257add31 2020-09-09 stsp are treated as comments and ignored.
40 257add31 2020-09-09 stsp .Pp
41 257add31 2020-09-09 stsp The available configuration directives are as follows:
42 257add31 2020-09-09 stsp .Bl -tag -width Ds
43 257add31 2020-09-09 stsp .It Ic author Dq Real Name <email address>
44 257add31 2020-09-09 stsp Configure the author's name and email address for
45 257add31 2020-09-09 stsp .Cm got commit
46 257add31 2020-09-09 stsp and
47 257add31 2020-09-09 stsp .Cm got import
48 257add31 2020-09-09 stsp when operating on this repository.
49 257add31 2020-09-09 stsp Author information specified here overrides the
50 257add31 2020-09-09 stsp .Ev GOT_AUTHOR
51 257add31 2020-09-09 stsp environment variable.
52 257add31 2020-09-09 stsp .Pp
53 257add31 2020-09-09 stsp Because
54 257add31 2020-09-09 stsp .Xr git 1
55 257add31 2020-09-09 stsp may fail to parse commits without an email address in author data,
56 257add31 2020-09-09 stsp .Xr got 1
57 257add31 2020-09-09 stsp attempts to reject author information with a missing email address.
58 10c4445c 2022-07-04 stsp .It Ic allowed_signers Pa path
59 10c4445c 2022-07-04 stsp Configure a
60 10c4445c 2022-07-04 stsp .Ar path
61 10c4445c 2022-07-04 stsp to the "allowed signers" file which contains a list of trusted
62 10c4445c 2022-07-04 stsp SSH signer identities.
63 10c4445c 2022-07-04 stsp The file will be passed to
64 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
65 10c4445c 2022-07-04 stsp during verification of SSH-based signatures with
66 10c4445c 2022-07-04 stsp .Cm got tag Fl V .
67 10c4445c 2022-07-04 stsp The format of the "allowed signers" file is documented in the
68 10c4445c 2022-07-04 stsp ALLOWED SIGNERS section of
69 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1 .
70 10c4445c 2022-07-04 stsp .Pp
71 10c4445c 2022-07-04 stsp Verification of SSH-based signatures is impossible unless the
72 10c4445c 2022-07-04 stsp .Ic allowed_signers
73 10c4445c 2022-07-04 stsp option is set in
74 10c4445c 2022-07-04 stsp .Nm .
75 10c4445c 2022-07-04 stsp .It Ic revoked_signers Pa path
76 10c4445c 2022-07-04 stsp Configure a
77 10c4445c 2022-07-04 stsp .Ar path
78 10c4445c 2022-07-04 stsp to the optional "revoked signers" file, which contains a list of revoked
79 10c4445c 2022-07-04 stsp SSH signer identities.
80 10c4445c 2022-07-04 stsp This file is passed to
81 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
82 10c4445c 2022-07-04 stsp during signature verification with
83 10c4445c 2022-07-04 stsp .Cm got tag Fl V .
84 10c4445c 2022-07-04 stsp Revoked identities are no longer considered trustworthy and verification
85 10c4445c 2022-07-04 stsp of relevant signatures will fail.
86 257add31 2020-09-09 stsp .It Ic remote Ar name Brq ...
87 257add31 2020-09-09 stsp Define a remote repository.
88 257add31 2020-09-09 stsp The specified
89 257add31 2020-09-09 stsp .Ar name
90 257add31 2020-09-09 stsp can be used to refer to the remote repository on the command line of
91 6480c871 2021-08-30 stsp .Cm got fetch
92 6480c871 2021-08-30 stsp and
93 6480c871 2021-08-30 stsp .Cm got send .
94 257add31 2020-09-09 stsp .Pp
95 257add31 2020-09-09 stsp Information about this repository is declared in a block of options
96 257add31 2020-09-09 stsp enclosed in curly brackets:
97 257add31 2020-09-09 stsp .Bl -tag -width Ds
98 257add31 2020-09-09 stsp .It Ic server Ar hostname
99 257add31 2020-09-09 stsp Defines the hostname to use for contacting the remote repository's server.
100 257add31 2020-09-09 stsp .It Ic repository Ar path
101 257add31 2020-09-09 stsp Defines the path to the repository on the remote repository's server.
102 257add31 2020-09-09 stsp .It Ic protocol Ar scheme
103 257add31 2020-09-09 stsp Defines the protocol to use for communicating with the remote repository's
104 257add31 2020-09-09 stsp server.
105 257add31 2020-09-09 stsp .Pp
106 257add31 2020-09-09 stsp The following protocol schemes are supported:
107 257add31 2020-09-09 stsp .Bl -tag -width git+ssh
108 257add31 2020-09-09 stsp .It git
109 257add31 2020-09-09 stsp The Git protocol as implemented by the
110 257add31 2020-09-09 stsp .Xr git-daemon 1
111 257add31 2020-09-09 stsp server.
112 257add31 2020-09-09 stsp Use of this protocol is discouraged since it supports neither authentication
113 257add31 2020-09-09 stsp nor encryption.
114 257add31 2020-09-09 stsp .It git+ssh
115 257add31 2020-09-09 stsp The Git protocol wrapped in an authenticated and encrypted
116 257add31 2020-09-09 stsp .Xr ssh 1
117 257add31 2020-09-09 stsp tunnel.
118 257add31 2020-09-09 stsp With this protocol the hostname may contain an embedded username for
119 257add31 2020-09-09 stsp .Xr ssh 1
120 257add31 2020-09-09 stsp to use:
121 257add31 2020-09-09 stsp .Mt user@hostname
122 257add31 2020-09-09 stsp .It ssh
123 257add31 2020-09-09 stsp Short alias for git+ssh.
124 257add31 2020-09-09 stsp .El
125 257add31 2020-09-09 stsp .It Ic port Ar port
126 257add31 2020-09-09 stsp Defines the port to use for connecting to the remote repository's server.
127 257add31 2020-09-09 stsp The
128 257add31 2020-09-09 stsp .Ar port
129 257add31 2020-09-09 stsp can be specified by number or name.
130 257add31 2020-09-09 stsp The port name to number mappings are found in the file
131 257add31 2020-09-09 stsp .Pa /etc/services ;
132 257add31 2020-09-09 stsp see
133 257add31 2020-09-09 stsp .Xr services 5
134 257add31 2020-09-09 stsp for details.
135 257add31 2020-09-09 stsp If not specified, the default port of the specified
136 257add31 2020-09-09 stsp .Cm protocol
137 257add31 2020-09-09 stsp will be used.
138 b8adfa55 2020-09-25 stsp .It Ic branch Brq Ar branch ...
139 b8adfa55 2020-09-25 stsp Specify one or more branches which
140 b8adfa55 2020-09-25 stsp .Cm got fetch
141 6480c871 2021-08-30 stsp and
142 6480c871 2021-08-30 stsp .Cm got send
143 93f8a337 2021-08-30 naddy should fetch from and send to the remote repository by default.
144 b8adfa55 2020-09-25 stsp The list of branches specified here can be overridden at the
145 b8adfa55 2020-09-25 stsp .Cm got fetch
146 6480c871 2021-08-30 stsp and
147 6480c871 2021-08-30 stsp .Cm got send
148 6480c871 2021-08-30 stsp command lines with the
149 b8adfa55 2020-09-25 stsp .Fl b
150 b8adfa55 2020-09-25 stsp option.
151 f1bf60d1 2022-07-03 stsp .It Ic fetch_all_branches Ar yes | no
152 0c8b29c5 2021-01-05 stsp This option controls whether
153 0c8b29c5 2021-01-05 stsp .Cm got fetch
154 0c8b29c5 2021-01-05 stsp will fetch all branches from the remote repository by default.
155 0c8b29c5 2021-01-05 stsp If enabled, this behaviour can be overridden at the
156 0c8b29c5 2021-01-05 stsp .Cm got fetch
157 0c8b29c5 2021-01-05 stsp command line with the
158 0c8b29c5 2021-01-05 stsp .Fl b
159 0c8b29c5 2021-01-05 stsp option, and any
160 0c8b29c5 2021-01-05 stsp .Cm branch
161 0c8b29c5 2021-01-05 stsp configuration settings for this remote repository will be ignored.
162 99495ddb 2021-01-10 stsp .It Ic reference Brq Ar reference ...
163 99495ddb 2021-01-10 stsp Specify one or more arbitrary references which
164 99495ddb 2021-01-10 stsp .Cm got fetch
165 99495ddb 2021-01-10 stsp should fetch by default, in addition to the branches and tags that will
166 99495ddb 2021-01-10 stsp be fetched.
167 99495ddb 2021-01-10 stsp The list of references specified here can be overridden at the
168 99495ddb 2021-01-10 stsp .Cm got fetch
169 99495ddb 2021-01-10 stsp command line with the
170 99495ddb 2021-01-10 stsp .Fl R
171 99495ddb 2021-01-10 stsp option.
172 99495ddb 2021-01-10 stsp .Cm got fetch
173 99495ddb 2021-01-10 stsp will refuse to fetch references from the remote repository's
174 99495ddb 2021-01-10 stsp .Dq refs/remotes/
175 99495ddb 2021-01-10 stsp or
176 99495ddb 2021-01-10 stsp .Dq refs/got/
177 99495ddb 2021-01-10 stsp namespace.
178 99495ddb 2021-01-10 stsp In any case, references in the
179 99495ddb 2021-01-10 stsp .Dq refs/tags/
180 99495ddb 2021-01-10 stsp namespace will always be fetched and mapped directly to local references
181 99495ddb 2021-01-10 stsp in the same namespace.
182 26e6f38e 2022-07-03 stsp .It Ic mirror_references Ar yes | no
183 257add31 2020-09-09 stsp This option controls the behaviour of
184 257add31 2020-09-09 stsp .Cm got fetch
185 257add31 2020-09-09 stsp when updating references.
186 257add31 2020-09-09 stsp .Sy Enabling this option can lead to the loss of local commits.
187 257add31 2020-09-09 stsp Maintaining custom changes in a mirror repository is therefore discouraged.
188 257add31 2020-09-09 stsp .Pp
189 257add31 2020-09-09 stsp If this option is not specified or set to
190 257add31 2020-09-09 stsp .Ar no ,
191 257add31 2020-09-09 stsp .Cm got fetch
192 257add31 2020-09-09 stsp will map references of the remote repository into the local repository's
193 257add31 2020-09-09 stsp .Dq refs/remotes/
194 257add31 2020-09-09 stsp namespace.
195 257add31 2020-09-09 stsp .Pp
196 257add31 2020-09-09 stsp If this option is set to
197 257add31 2020-09-09 stsp .Ar yes ,
198 257add31 2020-09-09 stsp all branches in the
199 257add31 2020-09-09 stsp .Dq refs/heads/
200 257add31 2020-09-09 stsp namespace will be updated directly to match the corresponding branches in
201 257add31 2020-09-09 stsp the remote repository.
202 6480c871 2021-08-30 stsp .It Ic fetch Brq ...
203 6480c871 2021-08-30 stsp An optional
204 6480c871 2021-08-30 stsp .Ic fetch
205 6480c871 2021-08-30 stsp block may contain any of the following configuration settings
206 6480c871 2021-08-30 stsp for use by
207 6480c871 2021-08-30 stsp .Cm got fetch ,
208 6480c871 2021-08-30 stsp overriding corresponding settings in the containing
209 6480c871 2021-08-30 stsp .Ic remote Ar name Brq ...
210 6480c871 2021-08-30 stsp block.
211 6480c871 2021-08-30 stsp .Bl -bullet
212 6480c871 2021-08-30 stsp .It
213 6480c871 2021-08-30 stsp .Ic server Ar hostname
214 6480c871 2021-08-30 stsp .It
215 6480c871 2021-08-30 stsp .Ic repository Ar path
216 6480c871 2021-08-30 stsp .It
217 824d5f77 2021-09-12 stsp .Ic protocol Ar scheme
218 6480c871 2021-08-30 stsp .It
219 6480c871 2021-08-30 stsp .Ic port Ar port
220 6480c871 2021-08-30 stsp .It
221 6480c871 2021-08-30 stsp .Ic branch Brq Ar branch ...
222 257add31 2020-09-09 stsp .El
223 6480c871 2021-08-30 stsp .It Ic send Brq ...
224 6480c871 2021-08-30 stsp An optional
225 6480c871 2021-08-30 stsp .Ic send
226 6480c871 2021-08-30 stsp block may contain any of the following configuration settings
227 6480c871 2021-08-30 stsp for use by
228 6480c871 2021-08-30 stsp .Cm got send ,
229 6480c871 2021-08-30 stsp overriding corresponding settings in the containing
230 6480c871 2021-08-30 stsp .Ic remote Ar name Brq ...
231 6480c871 2021-08-30 stsp block.
232 6480c871 2021-08-30 stsp .Bl -bullet
233 6480c871 2021-08-30 stsp .It
234 6480c871 2021-08-30 stsp .Ic server Ar hostname
235 6480c871 2021-08-30 stsp .It
236 6480c871 2021-08-30 stsp .Ic repository Ar path
237 6480c871 2021-08-30 stsp .It
238 824d5f77 2021-09-12 stsp .Ic protocol Ar scheme
239 6480c871 2021-08-30 stsp .It
240 6480c871 2021-08-30 stsp .Ic port Ar port
241 6480c871 2021-08-30 stsp .It
242 6480c871 2021-08-30 stsp .Ic branch Brq Ar branch ...
243 1795b260 2021-04-02 kn .El
244 6480c871 2021-08-30 stsp .El
245 6480c871 2021-08-30 stsp .El
246 257add31 2020-09-09 stsp .Sh EXAMPLES
247 257add31 2020-09-09 stsp Configure author information:
248 257add31 2020-09-09 stsp .Bd -literal -offset indent
249 257add31 2020-09-09 stsp author "Flan Hacker <flan_hacker@openbsd.org>"
250 257add31 2020-09-09 stsp .Ed
251 257add31 2020-09-09 stsp .Pp
252 257add31 2020-09-09 stsp Remote repository specification for the Game of Trees repository:
253 257add31 2020-09-09 stsp .Bd -literal -offset indent
254 257add31 2020-09-09 stsp remote "origin" {
255 257add31 2020-09-09 stsp server git.gameoftrees.org
256 257add31 2020-09-09 stsp protocol git
257 257add31 2020-09-09 stsp repository got
258 b8adfa55 2020-09-25 stsp branch { "main" }
259 257add31 2020-09-09 stsp }
260 257add31 2020-09-09 stsp .Ed
261 257add31 2020-09-09 stsp .Pp
262 1795b260 2021-04-02 kn Mirror the
263 1795b260 2021-04-02 kn .Ox
264 1795b260 2021-04-02 kn src repository from Github:
265 257add31 2020-09-09 stsp .Bd -literal -offset indent
266 257add31 2020-09-09 stsp remote "origin" {
267 257add31 2020-09-09 stsp repository "openbsd/src"
268 257add31 2020-09-09 stsp server git@github.com
269 257add31 2020-09-09 stsp protocol git+ssh
270 26e6f38e 2022-07-03 stsp mirror_references yes
271 257add31 2020-09-09 stsp }
272 257add31 2020-09-09 stsp .Ed
273 6480c871 2021-08-30 stsp .Pp
274 6480c871 2021-08-30 stsp Fetch changes via the Git protocol and send changes via the SSH protocol:
275 6480c871 2021-08-30 stsp .Bd -literal -offset indent
276 6480c871 2021-08-30 stsp remote "origin" {
277 6480c871 2021-08-30 stsp repository my_repo
278 6480c871 2021-08-30 stsp server git.example.com
279 6480c871 2021-08-30 stsp protocol git
280 6480c871 2021-08-30 stsp send {
281 6480c871 2021-08-30 stsp server git@git.example.com
282 6480c871 2021-08-30 stsp protocol ssh
283 6480c871 2021-08-30 stsp }
284 6480c871 2021-08-30 stsp }
285 6480c871 2021-08-30 stsp .Ed
286 257add31 2020-09-09 stsp .Sh FILES
287 257add31 2020-09-09 stsp .Bl -tag -width Ds -compact
288 257add31 2020-09-09 stsp .It Pa got.conf
289 50b0790e 2020-09-11 stsp If present,
290 257add31 2020-09-09 stsp .Nm
291 50b0790e 2020-09-11 stsp located in the root directory of a Git repository supersedes any relevant
292 50b0790e 2020-09-11 stsp settings in Git's
293 257add31 2020-09-09 stsp .Pa config
294 257add31 2020-09-09 stsp file.
295 50b0790e 2020-09-11 stsp .Pp
296 50b0790e 2020-09-11 stsp .It Pa .got/got.conf
297 50b0790e 2020-09-11 stsp If present,
298 50b0790e 2020-09-11 stsp .Nm
299 50b0790e 2020-09-11 stsp located in the
300 50b0790e 2020-09-11 stsp .Pa .got
301 50b0790e 2020-09-11 stsp meta-data directory of a
302 50b0790e 2020-09-11 stsp .Xr got 1
303 50b0790e 2020-09-11 stsp work tree supersedes any relevant settings in the repository's
304 50b0790e 2020-09-11 stsp .Nm
305 50b0790e 2020-09-11 stsp configuration file and Git's
306 50b0790e 2020-09-11 stsp .Pa config
307 50b0790e 2020-09-11 stsp file.
308 257add31 2020-09-09 stsp .El
309 257add31 2020-09-09 stsp .Sh SEE ALSO
310 257add31 2020-09-09 stsp .Xr got 1 ,
311 42536c09 2020-09-11 stsp .Xr git-repository 5 ,
312 50b0790e 2020-09-11 stsp .Xr got-worktree 5
313 53643ae1 2020-09-14 stsp .Sh CAVEATS
314 53643ae1 2020-09-14 stsp .Nm
315 53643ae1 2020-09-14 stsp offers no way to configure the editor spawned by
316 53643ae1 2020-09-14 stsp .Cm got commit ,
317 53643ae1 2020-09-14 stsp .Cm got histedit ,
318 53643ae1 2020-09-14 stsp .Cm got import ,
319 53643ae1 2020-09-14 stsp or
320 53643ae1 2020-09-14 stsp .Cm got tag .
321 53643ae1 2020-09-14 stsp This is deliberate and prevents potential arbitrary command execution
322 53643ae1 2020-09-14 stsp as another user when repositories or work trees are shared between users.
323 53643ae1 2020-09-14 stsp Users should set their
324 53643ae1 2020-09-14 stsp .Ev VISUAL
325 53643ae1 2020-09-14 stsp or
326 53643ae1 2020-09-14 stsp .Ev EDITOR
327 53643ae1 2020-09-14 stsp environment variables instead.