Blame


1 3efd8e31 2022-10-23 thomas .\"
2 3efd8e31 2022-10-23 thomas .\" Copyright (c) 2022 Stefan Sperling
3 3efd8e31 2022-10-23 thomas .\"
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.
7 3efd8e31 2022-10-23 thomas .\"
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.
15 3efd8e31 2022-10-23 thomas .\"
16 3efd8e31 2022-10-23 thomas .Dd $Mdocdate$
17 3efd8e31 2022-10-23 thomas .Dt GOTSH 1
18 3efd8e31 2022-10-23 thomas .Os
19 3efd8e31 2022-10-23 thomas .Sh NAME
20 3efd8e31 2022-10-23 thomas .Nm gotsh
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
26 3efd8e31 2022-10-23 thomas .Nm
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
30 3efd8e31 2022-10-23 thomas .Xr git 1
31 3efd8e31 2022-10-23 thomas and
32 3efd8e31 2022-10-23 thomas .Xr got 1 .
33 3efd8e31 2022-10-23 thomas .Pp
34 3efd8e31 2022-10-23 thomas .Nm
35 3efd8e31 2022-10-23 thomas is not an interactive shell.
36 3efd8e31 2022-10-23 thomas .Nm
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,
41 65ca77c9 2022-10-23 thomas .Nm
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
44 65ca77c9 2022-10-23 thomas and
45 65ca77c9 2022-10-23 thomas .Cm git-upload-pack .
46 65ca77c9 2022-10-23 thomas .Pp
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
52 3efd8e31 2022-10-23 thomas and
53 3efd8e31 2022-10-23 thomas .Cm got fetch
54 3efd8e31 2022-10-23 thomas on client machines,
55 3efd8e31 2022-10-23 thomas .Xr got 1
56 3efd8e31 2022-10-23 thomas will connect to the server with
57 3efd8e31 2022-10-23 thomas .Xr ssh 1 .
58 3efd8e31 2022-10-23 thomas .Nm
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
62 3efd8e31 2022-10-23 thomas .Xr got 1
63 3efd8e31 2022-10-23 thomas or
64 3efd8e31 2022-10-23 thomas .Xr git 1
65 3efd8e31 2022-10-23 thomas program running on the client machine.
66 3efd8e31 2022-10-23 thomas .Pp
67 3efd8e31 2022-10-23 thomas Users running
68 3efd8e31 2022-10-23 thomas .Nm
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
72 3efd8e31 2022-10-23 thomas via
73 3efd8e31 2022-10-23 thomas .Nm .
74 3efd8e31 2022-10-23 thomas .Pp
75 3efd8e31 2022-10-23 thomas It is recommended to restrict
76 3efd8e31 2022-10-23 thomas .Xr ssh 1
77 3efd8e31 2022-10-23 thomas features available to users of
78 3efd8e31 2022-10-23 thomas .Nm .
79 53968af2 2022-10-24 thomas See the
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.
91 3efd8e31 2022-10-23 thomas .El
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
101 e195fd16 2022-11-17 thomas .Ed
102 f2fc8ce0 2023-01-06 thomas .Pp
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
110 f2fc8ce0 2023-01-06 thomas .Ed
111 414c3236 2023-01-31 thomas .Pp
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
119 414c3236 2023-01-31 thomas }
120 414c3236 2023-01-31 thomas .Ed
121 414c3236 2023-01-31 thomas .Pp
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
128 414c3236 2023-01-31 thomas .Ed
129 414c3236 2023-01-31 thomas .Pp
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
138 414c3236 2023-01-31 thomas .Ed
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