2 3efd8e31 2022-10-23 thomas .\" Copyright (c) 2022 Stefan Sperling
4 3efd8e31 2022-10-23 thomas .\" Permission to use, copy, modify, and distribute this software for any
5 3efd8e31 2022-10-23 thomas .\" purpose with or without fee is hereby granted, provided that the above
6 3efd8e31 2022-10-23 thomas .\" copyright notice and this permission notice appear in all copies.
8 3efd8e31 2022-10-23 thomas .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 3efd8e31 2022-10-23 thomas .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 3efd8e31 2022-10-23 thomas .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 3efd8e31 2022-10-23 thomas .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 3efd8e31 2022-10-23 thomas .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 3efd8e31 2022-10-23 thomas .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 3efd8e31 2022-10-23 thomas .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 3efd8e31 2022-10-23 thomas .Dd $Mdocdate$
17 3efd8e31 2022-10-23 thomas .Dt GOTSH 1
21 3efd8e31 2022-10-23 thomas .Nd Game of Trees Shell
22 3efd8e31 2022-10-23 thomas .Sh SYNOPSIS
23 3efd8e31 2022-10-23 thomas .Nm Fl c Sq Cm git-receive-pack Ar repository-path
24 3efd8e31 2022-10-23 thomas .Nm Fl c Sq Cm git-upload-pack Ar repository-path
25 3efd8e31 2022-10-23 thomas .Sh DESCRIPTION
27 3efd8e31 2022-10-23 thomas is the network-facing interface to
28 3efd8e31 2022-10-23 thomas .Xr gotd 8 .
29 3efd8e31 2022-10-23 thomas It implements the server-side part of the Git network protocol used by
32 3efd8e31 2022-10-23 thomas .Xr got 1 .
35 3efd8e31 2022-10-23 thomas is not an interactive shell.
37 3efd8e31 2022-10-23 thomas is intended to be configured as the login shell of Git repository
38 3efd8e31 2022-10-23 thomas user accounts on servers running
39 3efd8e31 2022-10-23 thomas .Xr gotd 8 .
40 65ca77c9 2022-10-23 thomas If users require a different login shell,
42 dd9026fb 2022-10-24 thomas can be installed in the command search path under the names
43 65ca77c9 2022-10-23 thomas .Cm git-receive-pack
45 65ca77c9 2022-10-23 thomas .Cm git-upload-pack .
47 3efd8e31 2022-10-23 thomas The users can then interact with
48 3efd8e31 2022-10-23 thomas .Xr gotd 8
49 3efd8e31 2022-10-23 thomas over the network.
50 3efd8e31 2022-10-23 thomas When users invoke commands such as
51 3efd8e31 2022-10-23 thomas .Cm got send
53 3efd8e31 2022-10-23 thomas .Cm got fetch
54 3efd8e31 2022-10-23 thomas on client machines,
56 3efd8e31 2022-10-23 thomas will connect to the server with
57 3efd8e31 2022-10-23 thomas .Xr ssh 1 .
59 3efd8e31 2022-10-23 thomas will facilitate communication between
60 3efd8e31 2022-10-23 thomas .Xr gotd 8
61 3efd8e31 2022-10-23 thomas running on the server machine and the
65 3efd8e31 2022-10-23 thomas program running on the client machine.
67 3efd8e31 2022-10-23 thomas Users running
69 3efd8e31 2022-10-23 thomas should not have access to Git repositories by means other than
70 3efd8e31 2022-10-23 thomas accessing the unix socket of
71 3efd8e31 2022-10-23 thomas .Xr gotd 8
75 3efd8e31 2022-10-23 thomas It is recommended to restrict
77 3efd8e31 2022-10-23 thomas features available to users of
80 53968af2 2022-10-24 thomas .Sx EXAMPLES
81 53968af2 2022-10-24 thomas section for details.
82 3efd8e31 2022-10-23 thomas .Sh ENVIRONMENT
83 3efd8e31 2022-10-23 thomas .Bl -tag -width GOTD_UNIX_SOCKET
84 3efd8e31 2022-10-23 thomas .It Ev GOTD_UNIX_SOCKET
85 3efd8e31 2022-10-23 thomas Set the path to the unix socket which
86 3efd8e31 2022-10-23 thomas .Xr gotd 8
87 3efd8e31 2022-10-23 thomas is listening on.
88 3efd8e31 2022-10-23 thomas If not specified, the default path
89 3efd8e31 2022-10-23 thomas .Pa /var/run/gotd.sock
90 3efd8e31 2022-10-23 thomas will be used.
92 3efd8e31 2022-10-23 thomas .Sh EXAMPLES
93 3efd8e31 2022-10-23 thomas .Xr sshd_config 5
94 f2fc8ce0 2023-01-06 thomas directives such as the following are recommended to protect the server
95 f2fc8ce0 2023-01-06 thomas machine and any systems reachable from it, especially if anonymous users
96 f2fc8ce0 2023-01-06 thomas are allowed to connect:
97 3efd8e31 2022-10-23 thomas .Bd -literal -offset indent
98 414c3236 2023-01-31 thomas Match User developer
99 a0603cf4 2022-10-29 thomas DisableForwarding yes
100 3efd8e31 2022-10-23 thomas PermitTTY no
103 f2fc8ce0 2023-01-06 thomas It can be convenient to add all relevant users to a common group, such as
104 f2fc8ce0 2023-01-06 thomas .Dq developers ,
105 f2fc8ce0 2023-01-06 thomas and then use this group as the Match criteria:
106 f2fc8ce0 2023-01-06 thomas .Bd -literal -offset indent
107 f2fc8ce0 2023-01-06 thomas Match Group developers
108 f2fc8ce0 2023-01-06 thomas DisableForwarding yes
109 f2fc8ce0 2023-01-06 thomas PermitTTY no
112 414c3236 2023-01-31 thomas Anonymous users can be given public read-only access by using a
113 414c3236 2023-01-31 thomas .Xr gotd.conf 5
114 414c3236 2023-01-31 thomas access rule such as the following:
115 414c3236 2023-01-31 thomas .Bd -literal -offset indent
116 414c3236 2023-01-31 thomas repository "public" {
117 414c3236 2023-01-31 thomas path "/var/git/public.git"
118 414c3236 2023-01-31 thomas permit ro anonymous
122 414c3236 2023-01-31 thomas The anonymous user account should have a publicly known password, or can be
123 414c3236 2023-01-31 thomas set up with an empty password in which case the user's
124 414c3236 2023-01-31 thomas .Xr vipw 8
125 414c3236 2023-01-31 thomas entry would look similar to this example:
126 414c3236 2023-01-31 thomas .Bd -literal
127 414c3236 2023-01-31 thomas anonymous::1002:1002::0:0:Anonymous:/home/anonymous:/usr/local/bin/gotsh
130 414c3236 2023-01-31 thomas Use of an empty password must be explicitly allowed in
131 414c3236 2023-01-31 thomas .Xr sshd_config 5 :
132 414c3236 2023-01-31 thomas .Bd -literal -offset indent
133 414c3236 2023-01-31 thomas Match User anonymous
134 414c3236 2023-01-31 thomas PasswordAuthentication yes
135 414c3236 2023-01-31 thomas PermitEmptyPasswords yes
136 414c3236 2023-01-31 thomas DisableForwarding yes
137 414c3236 2023-01-31 thomas PermitTTY no
139 3efd8e31 2022-10-23 thomas .Sh SEE ALSO
140 3efd8e31 2022-10-23 thomas .Xr got 1 ,
141 3efd8e31 2022-10-23 thomas .Xr ssh 1 ,
142 3efd8e31 2022-10-23 thomas .Xr gotd.conf 5 ,
143 3efd8e31 2022-10-23 thomas .Xr sshd_config 5 ,
144 3efd8e31 2022-10-23 thomas .Xr gotd 8
145 3efd8e31 2022-10-23 thomas .Sh AUTHORS
146 3efd8e31 2022-10-23 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org