2 257add31 2020-09-09 stsp .\" Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
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.
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.
16 257add31 2020-09-09 stsp .Dd $Mdocdate$
17 257add31 2020-09-09 stsp .Dt GOT.CONF 5
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
24 257add31 2020-09-09 stsp is the run-time configuration file for
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
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
34 50b0790e 2020-09-11 stsp commands executed within this work tree.
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
39 257add31 2020-09-09 stsp are treated as comments and ignored.
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
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.
55 257add31 2020-09-09 stsp may fail to parse commits without an email address in author data,
57 257add31 2020-09-09 stsp attempts to reject author information with a missing email address.
58 d68f2c0e 2022-07-05 jrick .It Ic signer_id Pa signer-id
59 d68f2c0e 2022-07-05 jrick Configure a
60 d68f2c0e 2022-07-05 jrick .Ar signer-id
61 d68f2c0e 2022-07-05 jrick to sign tag objects.
62 d68f2c0e 2022-07-05 jrick This key will be used to sign all tag objects unless overridden by
63 d68f2c0e 2022-07-05 jrick .Cm got tag Fl s Ar signer-id .
65 d68f2c0e 2022-07-05 jrick For SSH-based signatures,
66 d68f2c0e 2022-07-05 jrick .Ar signer-id
67 d68f2c0e 2022-07-05 jrick is the path to a file which may refer to either a private SSH key,
68 d68f2c0e 2022-07-05 jrick or a public SSH key with the private half available via
69 d68f2c0e 2022-07-05 jrick .Xr ssh-agent 1 .
70 10c4445c 2022-07-04 stsp .It Ic allowed_signers Pa path
73 10c4445c 2022-07-04 stsp to the "allowed signers" file which contains a list of trusted
74 10c4445c 2022-07-04 stsp SSH signer identities.
75 10c4445c 2022-07-04 stsp The file will be passed to
76 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
77 10c4445c 2022-07-04 stsp during verification of SSH-based signatures with
78 10c4445c 2022-07-04 stsp .Cm got tag Fl V .
79 10c4445c 2022-07-04 stsp The format of the "allowed signers" file is documented in the
80 10c4445c 2022-07-04 stsp ALLOWED SIGNERS section of
81 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1 .
83 10c4445c 2022-07-04 stsp Verification of SSH-based signatures is impossible unless the
84 10c4445c 2022-07-04 stsp .Ic allowed_signers
85 10c4445c 2022-07-04 stsp option is set in
87 10c4445c 2022-07-04 stsp .It Ic revoked_signers Pa path
90 10c4445c 2022-07-04 stsp to the optional "revoked signers" file, which contains a list of revoked
91 10c4445c 2022-07-04 stsp SSH signer identities.
92 10c4445c 2022-07-04 stsp This file is passed to
93 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
94 10c4445c 2022-07-04 stsp during signature verification with
95 10c4445c 2022-07-04 stsp .Cm got tag Fl V .
96 10c4445c 2022-07-04 stsp Revoked identities are no longer considered trustworthy and verification
97 10c4445c 2022-07-04 stsp of relevant signatures will fail.
98 257add31 2020-09-09 stsp .It Ic remote Ar name Brq ...
99 257add31 2020-09-09 stsp Define a remote repository.
100 257add31 2020-09-09 stsp The specified
102 257add31 2020-09-09 stsp can be used to refer to the remote repository on the command line of
103 6480c871 2021-08-30 stsp .Cm got fetch
105 6480c871 2021-08-30 stsp .Cm got send .
107 d45bf965 2022-10-27 stsp When repositories are shared between multiple users on the system, it is
108 d45bf965 2022-10-27 stsp recommended that users configure their trusted remote repositories in each
109 d45bf965 2022-10-27 stsp of their work-trees'
111 d45bf965 2022-10-27 stsp files, overriding corresponding repository-wide settings.
112 d45bf965 2022-10-27 stsp This can avoid potentially undesirable connections to remote repositories
113 d45bf965 2022-10-27 stsp placed into the shared repository's
115 d45bf965 2022-10-27 stsp file by other users.
117 d45bf965 2022-10-27 stsp Information about a repository is declared in a block of options
118 257add31 2020-09-09 stsp enclosed in curly brackets:
119 257add31 2020-09-09 stsp .Bl -tag -width Ds
120 257add31 2020-09-09 stsp .It Ic server Ar hostname
121 257add31 2020-09-09 stsp Defines the hostname to use for contacting the remote repository's server.
122 257add31 2020-09-09 stsp .It Ic repository Ar path
123 257add31 2020-09-09 stsp Defines the path to the repository on the remote repository's server.
124 257add31 2020-09-09 stsp .It Ic protocol Ar scheme
125 257add31 2020-09-09 stsp Defines the protocol to use for communicating with the remote repository's
128 257add31 2020-09-09 stsp The following protocol schemes are supported:
129 78775350 2024-04-26 falsifian .Bl -tag -width https
131 257add31 2020-09-09 stsp The Git protocol as implemented by the
132 257add31 2020-09-09 stsp .Xr git-daemon 1
134 257add31 2020-09-09 stsp Use of this protocol is discouraged since it supports neither authentication
135 257add31 2020-09-09 stsp nor encryption.
136 1c8e2cfa 2024-04-26 falsifian .It ssh
137 257add31 2020-09-09 stsp The Git protocol wrapped in an authenticated and encrypted
140 257add31 2020-09-09 stsp With this protocol the hostname may contain an embedded username for
143 257add31 2020-09-09 stsp .Mt user@hostname
144 78775350 2024-04-26 falsifian .It http
146 78775350 2024-04-26 falsifian .Dq smart
147 78775350 2024-04-26 falsifian Git HTTP protocol.
148 78775350 2024-04-26 falsifian Not compatible with servers using the
149 78775350 2024-04-26 falsifian .Dq dumb
150 78775350 2024-04-26 falsifian Git HTTP protocol.
153 78775350 2024-04-26 falsifian .Dq smart
154 78775350 2024-04-26 falsifian Git HTTP protocol is supported by
155 78775350 2024-04-26 falsifian .Cm got clone
157 78775350 2024-04-26 falsifian .Cm got fetch ,
158 78775350 2024-04-26 falsifian but not by
159 78775350 2024-04-26 falsifian .Cm got send .
160 78775350 2024-04-26 falsifian To send from a repository cloned over HTTP, add a
161 78775350 2024-04-26 falsifian .Ic send
162 78775350 2024-04-26 falsifian block (see below) to ensure that the
163 78775350 2024-04-26 falsifian .Dq ssh://
164 78775350 2024-04-26 falsifian protocol will be used by
165 78775350 2024-04-26 falsifian .Cm got send .
167 78775350 2024-04-26 falsifian Use of this protocol is discouraged since it supports neither authentication
168 78775350 2024-04-26 falsifian nor encryption.
169 78775350 2024-04-26 falsifian .It https
171 78775350 2024-04-26 falsifian .Dq smart
172 78775350 2024-04-26 falsifian Git HTTP protocol wrapped in SSL/TLS.
174 257add31 2020-09-09 stsp .It Ic port Ar port
175 257add31 2020-09-09 stsp Defines the port to use for connecting to the remote repository's server.
178 257add31 2020-09-09 stsp can be specified by number or name.
179 257add31 2020-09-09 stsp The port name to number mappings are found in the file
180 257add31 2020-09-09 stsp .Pa /etc/services ;
182 257add31 2020-09-09 stsp .Xr services 5
183 257add31 2020-09-09 stsp for details.
184 257add31 2020-09-09 stsp If not specified, the default port of the specified
185 257add31 2020-09-09 stsp .Cm protocol
186 257add31 2020-09-09 stsp will be used.
187 b8adfa55 2020-09-25 stsp .It Ic branch Brq Ar branch ...
188 b8adfa55 2020-09-25 stsp Specify one or more branches which
189 b8adfa55 2020-09-25 stsp .Cm got fetch
191 6480c871 2021-08-30 stsp .Cm got send
192 93f8a337 2021-08-30 naddy should fetch from and send to the remote repository by default.
193 b8adfa55 2020-09-25 stsp The list of branches specified here can be overridden at the
194 b8adfa55 2020-09-25 stsp .Cm got fetch
196 6480c871 2021-08-30 stsp .Cm got send
197 6480c871 2021-08-30 stsp command lines with the
200 f1bf60d1 2022-07-03 stsp .It Ic fetch_all_branches Ar yes | no
201 0c8b29c5 2021-01-05 stsp This option controls whether
202 0c8b29c5 2021-01-05 stsp .Cm got fetch
203 0c8b29c5 2021-01-05 stsp will fetch all branches from the remote repository by default.
204 0c8b29c5 2021-01-05 stsp If enabled, this behaviour can be overridden at the
205 0c8b29c5 2021-01-05 stsp .Cm got fetch
206 0c8b29c5 2021-01-05 stsp command line with the
208 0c8b29c5 2021-01-05 stsp option, and any
210 0c8b29c5 2021-01-05 stsp configuration settings for this remote repository will be ignored.
211 99495ddb 2021-01-10 stsp .It Ic reference Brq Ar reference ...
212 99495ddb 2021-01-10 stsp Specify one or more arbitrary references which
213 99495ddb 2021-01-10 stsp .Cm got fetch
214 99495ddb 2021-01-10 stsp should fetch by default, in addition to the branches and tags that will
215 99495ddb 2021-01-10 stsp be fetched.
216 99495ddb 2021-01-10 stsp The list of references specified here can be overridden at the
217 99495ddb 2021-01-10 stsp .Cm got fetch
218 99495ddb 2021-01-10 stsp command line with the
221 99495ddb 2021-01-10 stsp .Cm got fetch
222 99495ddb 2021-01-10 stsp will refuse to fetch references from the remote repository's
223 99495ddb 2021-01-10 stsp .Dq refs/remotes/
225 99495ddb 2021-01-10 stsp .Dq refs/got/
227 99495ddb 2021-01-10 stsp In any case, references in the
228 99495ddb 2021-01-10 stsp .Dq refs/tags/
229 99495ddb 2021-01-10 stsp namespace will always be fetched and mapped directly to local references
230 99495ddb 2021-01-10 stsp in the same namespace.
231 26e6f38e 2022-07-03 stsp .It Ic mirror_references Ar yes | no
232 257add31 2020-09-09 stsp This option controls the behaviour of
233 257add31 2020-09-09 stsp .Cm got fetch
234 257add31 2020-09-09 stsp when updating references.
235 257add31 2020-09-09 stsp .Sy Enabling this option can lead to the loss of local commits.
236 257add31 2020-09-09 stsp Maintaining custom changes in a mirror repository is therefore discouraged.
238 257add31 2020-09-09 stsp If this option is not specified or set to
240 257add31 2020-09-09 stsp .Cm got fetch
241 257add31 2020-09-09 stsp will map references of the remote repository into the local repository's
242 257add31 2020-09-09 stsp .Dq refs/remotes/
245 257add31 2020-09-09 stsp If this option is set to
247 257add31 2020-09-09 stsp all branches in the
248 257add31 2020-09-09 stsp .Dq refs/heads/
249 257add31 2020-09-09 stsp namespace will be updated directly to match the corresponding branches in
250 257add31 2020-09-09 stsp the remote repository.
251 6480c871 2021-08-30 stsp .It Ic fetch Brq ...
252 6480c871 2021-08-30 stsp An optional
254 6480c871 2021-08-30 stsp block may contain any of the following configuration settings
256 6480c871 2021-08-30 stsp .Cm got fetch ,
257 6480c871 2021-08-30 stsp overriding corresponding settings in the containing
258 6480c871 2021-08-30 stsp .Ic remote Ar name Brq ...
260 6480c871 2021-08-30 stsp .Bl -bullet
262 6480c871 2021-08-30 stsp .Ic server Ar hostname
264 6480c871 2021-08-30 stsp .Ic repository Ar path
266 824d5f77 2021-09-12 stsp .Ic protocol Ar scheme
268 6480c871 2021-08-30 stsp .Ic port Ar port
270 6480c871 2021-08-30 stsp .Ic branch Brq Ar branch ...
272 6480c871 2021-08-30 stsp .It Ic send Brq ...
273 6480c871 2021-08-30 stsp An optional
275 6480c871 2021-08-30 stsp block may contain any of the following configuration settings
277 6480c871 2021-08-30 stsp .Cm got send ,
278 6480c871 2021-08-30 stsp overriding corresponding settings in the containing
279 6480c871 2021-08-30 stsp .Ic remote Ar name Brq ...
281 6480c871 2021-08-30 stsp .Bl -bullet
283 6480c871 2021-08-30 stsp .Ic server Ar hostname
285 6480c871 2021-08-30 stsp .Ic repository Ar path
287 824d5f77 2021-09-12 stsp .Ic protocol Ar scheme
289 6480c871 2021-08-30 stsp .Ic port Ar port
291 6480c871 2021-08-30 stsp .Ic branch Brq Ar branch ...
296 d375d894 2022-11-14 op .Bl -tag -width Ds -compact
297 d375d894 2022-11-14 op .It Pa got.conf
300 d375d894 2022-11-14 op located in the root directory of a Git repository supersedes any relevant
301 d375d894 2022-11-14 op settings in Git's
305 d375d894 2022-11-14 op .It Pa .got/got.conf
308 d375d894 2022-11-14 op located in the
310 d375d894 2022-11-14 op meta-data directory of a
312 d375d894 2022-11-14 op work tree supersedes any relevant settings in the repository's
314 d375d894 2022-11-14 op configuration file and Git's
318 257add31 2020-09-09 stsp .Sh EXAMPLES
319 257add31 2020-09-09 stsp Configure author information:
320 257add31 2020-09-09 stsp .Bd -literal -offset indent
321 257add31 2020-09-09 stsp author "Flan Hacker <flan_hacker@openbsd.org>"
324 257add31 2020-09-09 stsp Remote repository specification for the Game of Trees repository:
325 257add31 2020-09-09 stsp .Bd -literal -offset indent
326 257add31 2020-09-09 stsp remote "origin" {
327 b883aee3 2024-04-26 stsp server anonymous@got.gameoftrees.org
328 b883aee3 2024-04-26 stsp protocol ssh
329 257add31 2020-09-09 stsp repository got
330 b8adfa55 2020-09-25 stsp branch { "main" }
336 1795b260 2021-04-02 kn src repository from Github:
337 257add31 2020-09-09 stsp .Bd -literal -offset indent
338 257add31 2020-09-09 stsp remote "origin" {
339 257add31 2020-09-09 stsp repository "openbsd/src"
340 257add31 2020-09-09 stsp server git@github.com
341 257add31 2020-09-09 stsp protocol git+ssh
342 26e6f38e 2022-07-03 stsp mirror_references yes
346 6480c871 2021-08-30 stsp Fetch changes via the Git protocol and send changes via the SSH protocol:
347 6480c871 2021-08-30 stsp .Bd -literal -offset indent
348 6480c871 2021-08-30 stsp remote "origin" {
349 6480c871 2021-08-30 stsp repository my_repo
350 6480c871 2021-08-30 stsp server git.example.com
351 6480c871 2021-08-30 stsp protocol git
353 6480c871 2021-08-30 stsp server git@git.example.com
354 6480c871 2021-08-30 stsp protocol ssh
358 257add31 2020-09-09 stsp .Sh SEE ALSO
359 257add31 2020-09-09 stsp .Xr got 1 ,
360 42536c09 2020-09-11 stsp .Xr git-repository 5 ,
361 50b0790e 2020-09-11 stsp .Xr got-worktree 5
362 53643ae1 2020-09-14 stsp .Sh CAVEATS
364 53643ae1 2020-09-14 stsp offers no way to configure the editor spawned by
365 53643ae1 2020-09-14 stsp .Cm got commit ,
366 53643ae1 2020-09-14 stsp .Cm got histedit ,
367 53643ae1 2020-09-14 stsp .Cm got import ,
369 53643ae1 2020-09-14 stsp .Cm got tag .
370 53643ae1 2020-09-14 stsp This is deliberate and prevents potential arbitrary command execution
371 53643ae1 2020-09-14 stsp as another user when repositories or work trees are shared between users.
372 53643ae1 2020-09-14 stsp Users should set their
376 53643ae1 2020-09-14 stsp environment variables instead.