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 f897afc0 2023-04-22 thomas .Cm git-upload-pack ,
46 f897afc0 2023-04-22 thomas or
47 f897afc0 2023-04-22 thomas .Xr gitwrapper 1
48 f897afc0 2023-04-22 thomas can be used to select the appropriate command to run automatically.
49 65ca77c9 2022-10-23 thomas .Pp
50 3efd8e31 2022-10-23 thomas The users can then interact with
51 3efd8e31 2022-10-23 thomas .Xr gotd 8
52 3efd8e31 2022-10-23 thomas over the network.
53 3efd8e31 2022-10-23 thomas When users invoke commands such as
54 3efd8e31 2022-10-23 thomas .Cm got send
55 3efd8e31 2022-10-23 thomas and
56 3efd8e31 2022-10-23 thomas .Cm got fetch
57 3efd8e31 2022-10-23 thomas on client machines,
58 3efd8e31 2022-10-23 thomas .Xr got 1
59 3efd8e31 2022-10-23 thomas will connect to the server with
60 3efd8e31 2022-10-23 thomas .Xr ssh 1 .
61 3efd8e31 2022-10-23 thomas .Nm
62 3efd8e31 2022-10-23 thomas will facilitate communication between
63 3efd8e31 2022-10-23 thomas .Xr gotd 8
64 3efd8e31 2022-10-23 thomas running on the server machine and the
65 3efd8e31 2022-10-23 thomas .Xr got 1
66 3efd8e31 2022-10-23 thomas or
67 3efd8e31 2022-10-23 thomas .Xr git 1
68 3efd8e31 2022-10-23 thomas program running on the client machine.
69 3efd8e31 2022-10-23 thomas .Pp
70 3efd8e31 2022-10-23 thomas Users running
71 3efd8e31 2022-10-23 thomas .Nm
72 3efd8e31 2022-10-23 thomas should not have access to Git repositories by means other than
73 3efd8e31 2022-10-23 thomas accessing the unix socket of
74 3efd8e31 2022-10-23 thomas .Xr gotd 8
75 3efd8e31 2022-10-23 thomas via
76 3efd8e31 2022-10-23 thomas .Nm .
77 3efd8e31 2022-10-23 thomas .Pp
78 3efd8e31 2022-10-23 thomas It is recommended to restrict
79 3efd8e31 2022-10-23 thomas .Xr ssh 1
80 3efd8e31 2022-10-23 thomas features available to users of
81 3efd8e31 2022-10-23 thomas .Nm .
82 53968af2 2022-10-24 thomas See the
83 53968af2 2022-10-24 thomas .Sx EXAMPLES
84 53968af2 2022-10-24 thomas section for details.
85 3efd8e31 2022-10-23 thomas .Sh ENVIRONMENT
86 3efd8e31 2022-10-23 thomas .Bl -tag -width GOTD_UNIX_SOCKET
87 3efd8e31 2022-10-23 thomas .It Ev GOTD_UNIX_SOCKET
88 3efd8e31 2022-10-23 thomas Set the path to the unix socket which
89 3efd8e31 2022-10-23 thomas .Xr gotd 8
90 3efd8e31 2022-10-23 thomas is listening on.
91 3efd8e31 2022-10-23 thomas If not specified, the default path
92 3efd8e31 2022-10-23 thomas .Pa /var/run/gotd.sock
93 3efd8e31 2022-10-23 thomas will be used.
94 3efd8e31 2022-10-23 thomas .El
95 3efd8e31 2022-10-23 thomas .Sh EXAMPLES
96 3efd8e31 2022-10-23 thomas .Xr sshd_config 5
97 f2fc8ce0 2023-01-06 thomas directives such as the following are recommended to protect the server
98 f2fc8ce0 2023-01-06 thomas machine and any systems reachable from it, especially if anonymous users
99 f2fc8ce0 2023-01-06 thomas are allowed to connect:
100 3efd8e31 2022-10-23 thomas .Bd -literal -offset indent
101 414c3236 2023-01-31 thomas Match User developer
102 a0603cf4 2022-10-29 thomas DisableForwarding yes
103 3efd8e31 2022-10-23 thomas PermitTTY no
104 e195fd16 2022-11-17 thomas .Ed
105 f2fc8ce0 2023-01-06 thomas .Pp
106 f2fc8ce0 2023-01-06 thomas It can be convenient to add all relevant users to a common group, such as
107 f2fc8ce0 2023-01-06 thomas .Dq developers ,
108 f2fc8ce0 2023-01-06 thomas and then use this group as the Match criteria:
109 f2fc8ce0 2023-01-06 thomas .Bd -literal -offset indent
110 f2fc8ce0 2023-01-06 thomas Match Group developers
111 f2fc8ce0 2023-01-06 thomas DisableForwarding yes
112 f2fc8ce0 2023-01-06 thomas PermitTTY no
113 f2fc8ce0 2023-01-06 thomas .Ed
114 414c3236 2023-01-31 thomas .Pp
115 414c3236 2023-01-31 thomas Anonymous users can be given public read-only access by using a
116 414c3236 2023-01-31 thomas .Xr gotd.conf 5
117 414c3236 2023-01-31 thomas access rule such as the following:
118 414c3236 2023-01-31 thomas .Bd -literal -offset indent
119 414c3236 2023-01-31 thomas repository "public" {
120 414c3236 2023-01-31 thomas path "/var/git/public.git"
121 414c3236 2023-01-31 thomas permit ro anonymous
122 414c3236 2023-01-31 thomas }
123 414c3236 2023-01-31 thomas .Ed
124 414c3236 2023-01-31 thomas .Pp
125 414c3236 2023-01-31 thomas The anonymous user account should have a publicly known password, or can be
126 414c3236 2023-01-31 thomas set up with an empty password in which case the user's
127 414c3236 2023-01-31 thomas .Xr vipw 8
128 414c3236 2023-01-31 thomas entry would look similar to this example:
129 414c3236 2023-01-31 thomas .Bd -literal
130 414c3236 2023-01-31 thomas anonymous::1002:1002::0:0:Anonymous:/home/anonymous:/usr/local/bin/gotsh
131 414c3236 2023-01-31 thomas .Ed
132 414c3236 2023-01-31 thomas .Pp
133 414c3236 2023-01-31 thomas Use of an empty password must be explicitly allowed in
134 414c3236 2023-01-31 thomas .Xr sshd_config 5 :
135 414c3236 2023-01-31 thomas .Bd -literal -offset indent
136 414c3236 2023-01-31 thomas Match User anonymous
137 414c3236 2023-01-31 thomas PasswordAuthentication yes
138 414c3236 2023-01-31 thomas PermitEmptyPasswords yes
139 414c3236 2023-01-31 thomas DisableForwarding yes
140 414c3236 2023-01-31 thomas PermitTTY no
141 414c3236 2023-01-31 thomas .Ed
142 3efd8e31 2022-10-23 thomas .Sh SEE ALSO
143 f897afc0 2023-04-22 thomas .Xr gitwrapper 1 ,
144 3efd8e31 2022-10-23 thomas .Xr got 1 ,
145 3efd8e31 2022-10-23 thomas .Xr ssh 1 ,
146 3efd8e31 2022-10-23 thomas .Xr gotd.conf 5 ,
147 3efd8e31 2022-10-23 thomas .Xr sshd_config 5 ,
148 3efd8e31 2022-10-23 thomas .Xr gotd 8
149 3efd8e31 2022-10-23 thomas .Sh AUTHORS
150 3efd8e31 2022-10-23 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org