Blame


1 13b2bc37 2022-10-23 stsp .\"
2 13b2bc37 2022-10-23 stsp .\" Copyright (c) 2022 Stefan Sperling <stsp@openbsd.org>
3 13b2bc37 2022-10-23 stsp .\"
4 13b2bc37 2022-10-23 stsp .\" Permission to use, copy, modify, and distribute this software for any
5 13b2bc37 2022-10-23 stsp .\" purpose with or without fee is hereby granted, provided that the above
6 13b2bc37 2022-10-23 stsp .\" copyright notice and this permission notice appear in all copies.
7 13b2bc37 2022-10-23 stsp .\"
8 13b2bc37 2022-10-23 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 13b2bc37 2022-10-23 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 13b2bc37 2022-10-23 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 13b2bc37 2022-10-23 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 13b2bc37 2022-10-23 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 13b2bc37 2022-10-23 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 13b2bc37 2022-10-23 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 13b2bc37 2022-10-23 stsp .\"
16 13b2bc37 2022-10-23 stsp .Dd $Mdocdate$
17 13b2bc37 2022-10-23 stsp .Dt GOTD.CONF 5
18 13b2bc37 2022-10-23 stsp .Os
19 13b2bc37 2022-10-23 stsp .Sh NAME
20 13b2bc37 2022-10-23 stsp .Nm gotd.conf
21 13b2bc37 2022-10-23 stsp .Nd gotd configuration file
22 13b2bc37 2022-10-23 stsp .Sh DESCRIPTION
23 13b2bc37 2022-10-23 stsp .Nm
24 13b2bc37 2022-10-23 stsp is the run-time configuration file for
25 13b2bc37 2022-10-23 stsp .Xr gotd 8 .
26 13b2bc37 2022-10-23 stsp .Pp
27 13b2bc37 2022-10-23 stsp The file format is line-based, with one configuration directive per line.
28 13b2bc37 2022-10-23 stsp Any lines beginning with a
29 13b2bc37 2022-10-23 stsp .Sq #
30 13b2bc37 2022-10-23 stsp are treated as comments and ignored.
31 13b2bc37 2022-10-23 stsp .Sh GLOBAL CONFIGURATION
32 13b2bc37 2022-10-23 stsp The available global configuration directives are as follows:
33 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds
34 13b2bc37 2022-10-23 stsp .It Ic unix_socket Ar path
35 13b2bc37 2022-10-23 stsp Set the path to the unix socket which
36 13b2bc37 2022-10-23 stsp .Xr gotd 8
37 13b2bc37 2022-10-23 stsp should listen on.
38 13b2bc37 2022-10-23 stsp If not specified, the path
39 13b2bc37 2022-10-23 stsp .Pa /var/run/gotd.sock
40 13b2bc37 2022-10-23 stsp will be used.
41 13b2bc37 2022-10-23 stsp .It Ic unix_group Ar group
42 13b2bc37 2022-10-23 stsp Set the
43 13b2bc37 2022-10-23 stsp .Ar group ,
44 13b2bc37 2022-10-23 stsp defined in the
45 13b2bc37 2022-10-23 stsp .Xr group 5
46 13b2bc37 2022-10-23 stsp file, which is allowed to access
47 13b2bc37 2022-10-23 stsp .Xr gotd 8
48 13b2bc37 2022-10-23 stsp via
49 13b2bc37 2022-10-23 stsp .Xr gotsh 1 .
50 13b2bc37 2022-10-23 stsp The
51 13b2bc37 2022-10-23 stsp .Xr gotd 8
52 13b2bc37 2022-10-23 stsp user must be a secondary member of this group.
53 13b2bc37 2022-10-23 stsp If not specified, the group _gotsh will be used.
54 13b2bc37 2022-10-23 stsp .It Ic user Ar user
55 13b2bc37 2022-10-23 stsp Set the
56 13b2bc37 2022-10-23 stsp .Ar user
57 13b2bc37 2022-10-23 stsp which will run
58 13b2bc37 2022-10-23 stsp .Xr gotd 8 .
59 13b2bc37 2022-10-23 stsp Initially,
60 13b2bc37 2022-10-23 stsp .Xr gotd 8
61 13b2bc37 2022-10-23 stsp requires root privileges in order to create its unix socket and start
62 13b2bc37 2022-10-23 stsp child processes in a
63 13b2bc37 2022-10-23 stsp .Xr chroot 2
64 13b2bc37 2022-10-23 stsp environment.
65 13b2bc37 2022-10-23 stsp Afterwards,
66 13b2bc37 2022-10-23 stsp .Xr gotd 8
67 13b2bc37 2022-10-23 stsp drops privileges to the specified
68 13b2bc37 2022-10-23 stsp .Ar user .
69 13b2bc37 2022-10-23 stsp If not specified, the user _gotd will be used.
70 13b2bc37 2022-10-23 stsp .El
71 13b2bc37 2022-10-23 stsp .Sh REPOSITORY CONFIGURATION
72 13b2bc37 2022-10-23 stsp At least one repository context must exist for
73 13b2bc37 2022-10-23 stsp .Xr gotd 8
74 13b2bc37 2022-10-23 stsp to function.
75 13b2bc37 2022-10-23 stsp .Pp
76 13b2bc37 2022-10-23 stsp A repository context is declared with a unique
77 13b2bc37 2022-10-23 stsp .Ar name ,
78 13b2bc37 2022-10-23 stsp followed by repository-specific configuration directives inside curly braces:
79 13b2bc37 2022-10-23 stsp .Pp
80 13b2bc37 2022-10-23 stsp .Ic repository Ar name Brq ...
81 13b2bc37 2022-10-23 stsp .Pp
82 13b2bc37 2022-10-23 stsp .Xr got 1
83 13b2bc37 2022-10-23 stsp and
84 13b2bc37 2022-10-23 stsp .Xr git 1
85 13b2bc37 2022-10-23 stsp clients can connect to a repository by including the repository's unique
86 13b2bc37 2022-10-23 stsp .Ar name
87 13b2bc37 2022-10-23 stsp in the request URL.
88 13b2bc37 2022-10-23 stsp Clients appending the string
89 13b2bc37 2022-10-23 stsp .Dq .git
90 13b2bc37 2022-10-23 stsp to the
91 13b2bc37 2022-10-23 stsp .Ar name
92 13b2bc37 2022-10-23 stsp will also be accepted.
93 13b2bc37 2022-10-23 stsp .Pp
94 13b2bc37 2022-10-23 stsp If desired, the
95 13b2bc37 2022-10-23 stsp .Ar name
96 13b2bc37 2022-10-23 stsp may contain path-separators,
97 13b2bc37 2022-10-23 stsp .Dq / ,
98 13b2bc37 2022-10-23 stsp to expose repositories as part of a virtual client-visible directory hierarchy.
99 13b2bc37 2022-10-23 stsp .Pp
100 13b2bc37 2022-10-23 stsp The available repository configuration directives are as follows:
101 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds
102 13b2bc37 2022-10-23 stsp .It Ic path Ar path
103 13b2bc37 2022-10-23 stsp Set the path to the Git repository.
104 13b2bc37 2022-10-23 stsp .EL
105 13b2bc37 2022-10-23 stsp .Sh FILES
106 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds -compact
107 13b2bc37 2022-10-23 stsp .It Pa /etc/gotd.conf
108 13b2bc37 2022-10-23 stsp Location of the
109 13b2bc37 2022-10-23 stsp .Nm
110 13b2bc37 2022-10-23 stsp configuration file.
111 13b2bc37 2022-10-23 stsp .El
112 13b2bc37 2022-10-23 stsp .Sh EXAMPLES
113 13b2bc37 2022-10-23 stsp .Bd -literal -offset indent
114 13b2bc37 2022-10-23 stsp # Default unix_group and user values:
115 13b2bc37 2022-10-23 stsp unix_group _gotsh
116 13b2bc37 2022-10-23 stsp user _gotd
117 13b2bc37 2022-10-23 stsp
118 13b2bc37 2022-10-23 stsp # This repository can be accessed via ssh://user@example.com/src
119 13b2bc37 2022-10-23 stsp repository "src" {
120 13b2bc37 2022-10-23 stsp path "/var/git/src.git"
121 13b2bc37 2022-10-23 stsp }
122 13b2bc37 2022-10-23 stsp
123 13b2bc37 2022-10-23 stsp # This repository can be accessed via
124 13b2bc37 2022-10-23 stsp # ssh://user@example.com/openbsd/ports
125 13b2bc37 2022-10-23 stsp repository "openbsd/ports" {
126 13b2bc37 2022-10-23 stsp path "/var/git/ports.git"
127 13b2bc37 2022-10-23 stsp }
128 13b2bc37 2022-10-23 stsp .Ed
129 13b2bc37 2022-10-23 stsp .Sh SEE ALSO
130 13b2bc37 2022-10-23 stsp .Xr got 1 ,
131 13b2bc37 2022-10-23 stsp .Xr gotsh 1 ,
132 13b2bc37 2022-10-23 stsp .Xr group 5 ,
133 13b2bc37 2022-10-23 stsp .Xr gotd 8