Blame


1 13b2bc37 2022-10-23 stsp .\"
2 13b2bc37 2022-10-23 stsp .\" Copyright (c) 2022 Stefan Sperling
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 8
18 13b2bc37 2022-10-23 stsp .Os
19 13b2bc37 2022-10-23 stsp .Sh NAME
20 13b2bc37 2022-10-23 stsp .Nm gotd
21 13b2bc37 2022-10-23 stsp .Nd Game of Trees Daemon
22 13b2bc37 2022-10-23 stsp .Sh SYNOPSIS
23 13b2bc37 2022-10-23 stsp .Nm
24 e9e01966 2023-01-18 stsp .Op Fl dnv
25 13b2bc37 2022-10-23 stsp .Op Fl f Ar config-file
26 5fb267cb 2024-09-08 op .Op Fl s Ar secrets
27 13b2bc37 2022-10-23 stsp .Sh DESCRIPTION
28 13b2bc37 2022-10-23 stsp .Nm
29 13b2bc37 2022-10-23 stsp is a Git repository server which listens on a
30 13b2bc37 2022-10-23 stsp .Xr unix 4
31 13b2bc37 2022-10-23 stsp socket and relies on its companion tool
32 13b2bc37 2022-10-23 stsp .Xr gotsh 1
33 13b2bc37 2022-10-23 stsp to handle Git-protocol communication over the network, via
34 13b2bc37 2022-10-23 stsp .Xr ssh 1 .
35 13b2bc37 2022-10-23 stsp .Pp
36 13b2bc37 2022-10-23 stsp The Git repository format is described in
37 13b2bc37 2022-10-23 stsp .Xr git-repository 5 .
38 13b2bc37 2022-10-23 stsp .Pp
39 13b2bc37 2022-10-23 stsp .Nm
40 13b2bc37 2022-10-23 stsp requires a configuration file in order to run.
41 13b2bc37 2022-10-23 stsp The configuration file format is described in
42 13b2bc37 2022-10-23 stsp .Xr gotd.conf 5 .
43 13b2bc37 2022-10-23 stsp .Pp
44 c136f699 2023-01-03 stsp It is recommended to restrict
45 c136f699 2023-01-03 stsp .Xr ssh 1
46 c136f699 2023-01-03 stsp features available to users of
47 c136f699 2023-01-03 stsp .Nm .
48 c136f699 2023-01-03 stsp See
49 c136f699 2023-01-03 stsp .Xr gotsh 1
50 c136f699 2023-01-03 stsp for details.
51 c136f699 2023-01-03 stsp .Pp
52 13b2bc37 2022-10-23 stsp The options for
53 13b2bc37 2022-10-23 stsp .Nm
54 13b2bc37 2022-10-23 stsp are as follows:
55 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds
56 13b2bc37 2022-10-23 stsp .It Fl d
57 b3bed212 2023-01-19 op Do not daemonize.
58 b3bed212 2023-01-19 op Send log output to stderr.
59 13b2bc37 2022-10-23 stsp .It Fl f Ar config-file
60 13b2bc37 2022-10-23 stsp Set the path to the configuration file.
61 13b2bc37 2022-10-23 stsp If not specified, the file
62 13b2bc37 2022-10-23 stsp .Pa /etc/gotd.conf
63 13b2bc37 2022-10-23 stsp will be used.
64 e9e01966 2023-01-18 stsp .It Fl n
65 e9e01966 2023-01-18 stsp Configtest mode.
66 e9e01966 2023-01-18 stsp Only check the configuration file for validity.
67 5fb267cb 2024-09-08 op .It Fl s Ar secrets
68 5fb267cb 2024-09-08 op Set the path to the secrets file.
69 5fb267cb 2024-09-08 op If not specified, the file
70 5fb267cb 2024-09-08 op .Pa /etc/gotd-secrets.conf
71 5fb267cb 2024-09-08 op will be used if it exists.
72 13b2bc37 2022-10-23 stsp .It Fl v
73 13b2bc37 2022-10-23 stsp Verbose mode.
74 13b2bc37 2022-10-23 stsp Verbosity increases if this option is used multiple times.
75 4eb4de73 2022-11-14 op .El
76 13b2bc37 2022-10-23 stsp .Sh FILES
77 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds -compact
78 13b2bc37 2022-10-23 stsp .It Pa /etc/gotd.conf
79 13b2bc37 2022-10-23 stsp Default location of the configuration file.
80 13b2bc37 2022-10-23 stsp .It Pa /var/run/gotd.sock
81 13b2bc37 2022-10-23 stsp Default location of the unix socket which
82 13b2bc37 2022-10-23 stsp .Nm
83 13b2bc37 2022-10-23 stsp is listening on.
84 13b2bc37 2022-10-23 stsp This path can be configured in
85 13b2bc37 2022-10-23 stsp .Xr gotd.conf 5 .
86 13b2bc37 2022-10-23 stsp .El
87 d59a1c3b 2024-05-06 stsp .Sh EXAMPLES
88 d59a1c3b 2024-05-06 stsp Create an empty repository to be served by
89 d59a1c3b 2024-05-06 stsp .Nm ,
90 d59a1c3b 2024-05-06 stsp ensuring that it can only be accessed by the _gotd user:
91 d59a1c3b 2024-05-06 stsp .Pp
92 d59a1c3b 2024-05-06 stsp .Dl # mkdir -p /git/myrepo.git
93 d59a1c3b 2024-05-06 stsp .Dl # chmod 700 /git/myrepo.git
94 d59a1c3b 2024-05-06 stsp .Dl # chown _gotd /git/myrepo.git
95 d59a1c3b 2024-05-06 stsp .Dl # su -m _gotd -c 'gotadmin init /git/myrepo.git'
96 d59a1c3b 2024-05-06 stsp .Pp
97 d59a1c3b 2024-05-06 stsp Add the new repository to
98 d59a1c3b 2024-05-06 stsp .Xr gotd.conf 5
99 d59a1c3b 2024-05-06 stsp granting read-write access to the flan_hacker user account, and
100 d59a1c3b 2024-05-06 stsp restart
101 d59a1c3b 2024-05-06 stsp .Nm :
102 d59a1c3b 2024-05-06 stsp .Pp
103 d59a1c3b 2024-05-06 stsp .Dl # cat >> /etc/gotd.conf <<EOF
104 d59a1c3b 2024-05-06 stsp .Dl repository 'myrepo' {
105 d59a1c3b 2024-05-06 stsp .Dl path '/git/myrepo.git'
106 d59a1c3b 2024-05-06 stsp .Dl permit rw flan_hacker
107 d59a1c3b 2024-05-06 stsp .Dl }
108 d59a1c3b 2024-05-06 stsp .Dl EOF
109 d59a1c3b 2024-05-06 stsp .Dl # rcctl restart gotd
110 d59a1c3b 2024-05-06 stsp .Pp
111 d59a1c3b 2024-05-06 stsp The flan_hacker user can now populate the empty repository with
112 d59a1c3b 2024-05-06 stsp .Cm got send .
113 13b2bc37 2022-10-23 stsp .Sh SEE ALSO
114 13b2bc37 2022-10-23 stsp .Xr got 1 ,
115 13b2bc37 2022-10-23 stsp .Xr gotsh 1 ,
116 13b2bc37 2022-10-23 stsp .Xr git-repository 5 ,
117 13b2bc37 2022-10-23 stsp .Xr gotd.conf 5
118 5fb267cb 2024-09-08 op .Xr gotd-secrets.conf 5
119 13b2bc37 2022-10-23 stsp .Sh AUTHORS
120 13b2bc37 2022-10-23 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
121 ba35345d 2024-08-06 stsp .Sh CAVEATS
122 ba35345d 2024-08-06 stsp At present,
123 ba35345d 2024-08-06 stsp .Nm
124 ba35345d 2024-08-06 stsp cannot serve repositories that use the sha256 object ID hashing algorithm
125 ba35345d 2024-08-06 stsp because
126 ba35345d 2024-08-06 stsp .Nm
127 ba35345d 2024-08-06 stsp does not yet support version 2 of the Git network protocol.