Blame


1 742bb3a1 2022-10-24 stsp <!DOCTYPE html>
2 742bb3a1 2022-10-24 stsp <html>
3 742bb3a1 2022-10-24 stsp <head>
4 742bb3a1 2022-10-24 stsp <meta charset="utf-8"/>
5 742bb3a1 2022-10-24 stsp <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6 742bb3a1 2022-10-24 stsp <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
7 742bb3a1 2022-10-24 stsp <title>GOTSH(1)</title>
8 742bb3a1 2022-10-24 stsp </head>
9 742bb3a1 2022-10-24 stsp <!-- This is an automatically generated file. Do not edit.
10 742bb3a1 2022-10-24 stsp Copyright (c) 2022 Stefan Sperling
11 742bb3a1 2022-10-24 stsp
12 742bb3a1 2022-10-24 stsp Permission to use, copy, modify, and distribute this software for any
13 742bb3a1 2022-10-24 stsp purpose with or without fee is hereby granted, provided that the above
14 742bb3a1 2022-10-24 stsp copyright notice and this permission notice appear in all copies.
15 742bb3a1 2022-10-24 stsp
16 742bb3a1 2022-10-24 stsp THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 742bb3a1 2022-10-24 stsp WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 742bb3a1 2022-10-24 stsp MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 742bb3a1 2022-10-24 stsp ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 742bb3a1 2022-10-24 stsp WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 742bb3a1 2022-10-24 stsp ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 742bb3a1 2022-10-24 stsp OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 742bb3a1 2022-10-24 stsp -->
24 742bb3a1 2022-10-24 stsp <body>
25 742bb3a1 2022-10-24 stsp <div class="head" role="doc-pageheader" aria-label="Manual header
26 742bb3a1 2022-10-24 stsp line"><span class="head-ltitle">GOTSH(1)</span> <span class="head-vol">General
27 742bb3a1 2022-10-24 stsp Commands Manual</span> <span class="head-rtitle">GOTSH(1)</span></div>
28 742bb3a1 2022-10-24 stsp <main class="manual-text">
29 742bb3a1 2022-10-24 stsp <section class="Sh">
30 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h2>
31 742bb3a1 2022-10-24 stsp <p class="Pp"><code class="Nm">gotsh</code> &#x2014;
32 742bb3a1 2022-10-24 stsp <span class="Nd" role="doc-subtitle">Game of Trees Shell</span></p>
33 742bb3a1 2022-10-24 stsp </section>
34 742bb3a1 2022-10-24 stsp <section class="Sh">
35 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h2>
36 742bb3a1 2022-10-24 stsp <table class="Nm">
37 742bb3a1 2022-10-24 stsp <tr>
38 742bb3a1 2022-10-24 stsp <td><code class="Nm">gotsh <code class="Fl">-c</code>
39 742bb3a1 2022-10-24 stsp &#x2018;<code class="Cm">git-receive-pack</code>
40 742bb3a1 2022-10-24 stsp <var class="Ar">repository-path</var>&#x2019;</code></td>
41 742bb3a1 2022-10-24 stsp <td></td>
42 742bb3a1 2022-10-24 stsp </tr>
43 742bb3a1 2022-10-24 stsp </table>
44 742bb3a1 2022-10-24 stsp <br/>
45 742bb3a1 2022-10-24 stsp <table class="Nm">
46 742bb3a1 2022-10-24 stsp <tr>
47 742bb3a1 2022-10-24 stsp <td><code class="Nm">gotsh <code class="Fl">-c</code>
48 742bb3a1 2022-10-24 stsp &#x2018;<code class="Cm">git-upload-pack</code>
49 742bb3a1 2022-10-24 stsp <var class="Ar">repository-path</var>&#x2019;</code></td>
50 742bb3a1 2022-10-24 stsp <td></td>
51 742bb3a1 2022-10-24 stsp </tr>
52 742bb3a1 2022-10-24 stsp </table>
53 742bb3a1 2022-10-24 stsp </section>
54 742bb3a1 2022-10-24 stsp <section class="Sh">
55 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h2>
56 742bb3a1 2022-10-24 stsp <p class="Pp"><code class="Nm">gotsh</code> is the network-facing interface to
57 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="gotd, section 8">gotd(8)</a>. It implements the
58 742bb3a1 2022-10-24 stsp server-side part of the Git network protocol used by
59 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="git, section 1">git(1)</a> and
60 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="got, section 1">got(1)</a>.</p>
61 742bb3a1 2022-10-24 stsp <p class="Pp"><code class="Nm">gotsh</code> is not an interactive shell.
62 742bb3a1 2022-10-24 stsp <code class="Nm">gotsh</code> is intended to be configured as the login
63 742bb3a1 2022-10-24 stsp shell of Git repository user accounts on servers running
64 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="gotd, section 8">gotd(8)</a>. If users require a
65 742bb3a1 2022-10-24 stsp different login shell, <code class="Nm">gotsh</code> can be installed in the
66 742bb3a1 2022-10-24 stsp command search path under the names <code class="Cm">git-receive-pack</code>
67 4202fd2e 2023-04-20 stsp and <code class="Cm">git-upload-pack</code>, or
68 4202fd2e 2023-04-20 stsp <a class="Xr" aria-label="gitwrapper, section 1">gitwrapper(1)</a> can be
69 4202fd2e 2023-04-20 stsp used to select the appropriate command to run automatically.</p>
70 742bb3a1 2022-10-24 stsp <p class="Pp">The users can then interact with <a class="Xr" aria-label="gotd,
71 742bb3a1 2022-10-24 stsp section 8">gotd(8)</a> over the network. When users invoke commands such as
72 742bb3a1 2022-10-24 stsp <code class="Cm">got send</code> and <code class="Cm">got fetch</code> on
73 742bb3a1 2022-10-24 stsp client machines, <a class="Xr" aria-label="got, section 1">got(1)</a> will
74 742bb3a1 2022-10-24 stsp connect to the server with <a class="Xr" aria-label="ssh, section
75 742bb3a1 2022-10-24 stsp 1">ssh(1)</a>. <code class="Nm">gotsh</code> will facilitate communication
76 742bb3a1 2022-10-24 stsp between <a class="Xr" aria-label="gotd, section 8">gotd(8)</a> running on
77 742bb3a1 2022-10-24 stsp the server machine and the <a class="Xr" aria-label="got, section
78 742bb3a1 2022-10-24 stsp 1">got(1)</a> or <a class="Xr" aria-label="git, section 1">git(1)</a>
79 742bb3a1 2022-10-24 stsp program running on the client machine.</p>
80 47f19dd5 2023-01-17 stsp <p class="Pp">Users running <code class="Nm">gotsh</code> should not have access
81 47f19dd5 2023-01-17 stsp to Git repositories by means other than accessing the unix socket of
82 47f19dd5 2023-01-17 stsp <a class="Xr" aria-label="gotd, section 8">gotd(8)</a> via
83 742bb3a1 2022-10-24 stsp <code class="Nm">gotsh</code>.</p>
84 742bb3a1 2022-10-24 stsp <p class="Pp">It is recommended to restrict <a class="Xr" aria-label="ssh,
85 742bb3a1 2022-10-24 stsp section 1">ssh(1)</a> features available to users of
86 fd9580e1 2022-11-03 stsp <code class="Nm">gotsh</code>. See the
87 fd9580e1 2022-11-03 stsp <a class="Sx" href="#EXAMPLES">EXAMPLES</a> section for details.</p>
88 742bb3a1 2022-10-24 stsp </section>
89 742bb3a1 2022-10-24 stsp <section class="Sh">
90 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h2>
91 742bb3a1 2022-10-24 stsp <dl class="Bl-tag">
92 742bb3a1 2022-10-24 stsp <dt id="GOTD_UNIX_SOCKET"><a class="permalink" href="#GOTD_UNIX_SOCKET"><code class="Ev">GOTD_UNIX_SOCKET</code></a></dt>
93 742bb3a1 2022-10-24 stsp <dd>Set the path to the unix socket which <a class="Xr" aria-label="gotd,
94 742bb3a1 2022-10-24 stsp section 8">gotd(8)</a> is listening on. If not specified, the default path
95 742bb3a1 2022-10-24 stsp <span class="Pa">/var/run/gotd.sock</span> will be used.</dd>
96 742bb3a1 2022-10-24 stsp </dl>
97 742bb3a1 2022-10-24 stsp </section>
98 742bb3a1 2022-10-24 stsp <section class="Sh">
99 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h2>
100 47f19dd5 2023-01-17 stsp <p class="Pp"><a class="Xr" aria-label="sshd_config, section
101 47f19dd5 2023-01-17 stsp 5">sshd_config(5)</a> directives such as the following are recommended to
102 47f19dd5 2023-01-17 stsp protect the server machine and any systems reachable from it, especially if
103 47f19dd5 2023-01-17 stsp anonymous users are allowed to connect:</p>
104 742bb3a1 2022-10-24 stsp <div class="Bd Pp Bd-indent Li">
105 7985a487 2023-01-30 stsp <pre>Match User developer
106 fd9580e1 2022-11-03 stsp DisableForwarding yes
107 742bb3a1 2022-10-24 stsp PermitTTY no</pre>
108 742bb3a1 2022-10-24 stsp </div>
109 47f19dd5 2023-01-17 stsp <p class="Pp">It can be convenient to add all relevant users to a common group,
110 47f19dd5 2023-01-17 stsp such as &#x201C;developers&#x201D;, and then use this group as the Match
111 47f19dd5 2023-01-17 stsp criteria:</p>
112 47f19dd5 2023-01-17 stsp <div class="Bd Pp Bd-indent Li">
113 47f19dd5 2023-01-17 stsp <pre>Match Group developers
114 47f19dd5 2023-01-17 stsp DisableForwarding yes
115 47f19dd5 2023-01-17 stsp PermitTTY no</pre>
116 47f19dd5 2023-01-17 stsp </div>
117 7985a487 2023-01-30 stsp <p class="Pp">Anonymous users can be given public read-only access by using a
118 7985a487 2023-01-30 stsp <a class="Xr" aria-label="gotd.conf, section 5">gotd.conf(5)</a> access rule
119 7985a487 2023-01-30 stsp such as the following:</p>
120 7985a487 2023-01-30 stsp <div class="Bd Pp Bd-indent Li">
121 7985a487 2023-01-30 stsp <pre>repository &quot;public&quot; {
122 7985a487 2023-01-30 stsp path &quot;/var/git/public.git&quot;
123 7985a487 2023-01-30 stsp permit ro anonymous
124 7985a487 2023-01-30 stsp }</pre>
125 7985a487 2023-01-30 stsp </div>
126 7985a487 2023-01-30 stsp <p class="Pp">The anonymous user account should have a publicly known password,
127 7985a487 2023-01-30 stsp or can be set up with an empty password in which case the user's
128 7985a487 2023-01-30 stsp <a class="Xr" aria-label="vipw, section 8">vipw(8)</a> entry would look
129 7985a487 2023-01-30 stsp similar to this example:</p>
130 7985a487 2023-01-30 stsp <div class="Bd Pp Li">
131 7985a487 2023-01-30 stsp <pre>anonymous::1002:1002::0:0:Anonymous:/home/anonymous:/usr/local/bin/gotsh</pre>
132 7985a487 2023-01-30 stsp </div>
133 7985a487 2023-01-30 stsp <p class="Pp">Use of an empty password must be explicitly allowed in
134 7985a487 2023-01-30 stsp <a class="Xr" aria-label="sshd_config, section 5">sshd_config(5)</a>:</p>
135 7985a487 2023-01-30 stsp <div class="Bd Pp Bd-indent Li">
136 7985a487 2023-01-30 stsp <pre>Match User anonymous
137 7985a487 2023-01-30 stsp PasswordAuthentication yes
138 7985a487 2023-01-30 stsp PermitEmptyPasswords yes
139 7985a487 2023-01-30 stsp DisableForwarding yes
140 7985a487 2023-01-30 stsp PermitTTY no</pre>
141 7985a487 2023-01-30 stsp </div>
142 742bb3a1 2022-10-24 stsp </section>
143 742bb3a1 2022-10-24 stsp <section class="Sh">
144 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
145 742bb3a1 2022-10-24 stsp ALSO</a></h2>
146 4202fd2e 2023-04-20 stsp <p class="Pp"><a class="Xr" aria-label="gitwrapper, section
147 4202fd2e 2023-04-20 stsp 1">gitwrapper(1)</a>, <a class="Xr" aria-label="got, section 1">got(1)</a>,
148 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="ssh, section 1">ssh(1)</a>,
149 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="gotd.conf, section 5">gotd.conf(5)</a>,
150 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="sshd_config, section 5">sshd_config(5)</a>,
151 742bb3a1 2022-10-24 stsp <a class="Xr" aria-label="gotd, section 8">gotd(8)</a></p>
152 742bb3a1 2022-10-24 stsp </section>
153 742bb3a1 2022-10-24 stsp <section class="Sh">
154 742bb3a1 2022-10-24 stsp <h2 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h2>
155 742bb3a1 2022-10-24 stsp <p class="Pp"><span class="An">Stefan Sperling</span>
156 742bb3a1 2022-10-24 stsp &lt;<a class="Mt" href="mailto:stsp@openbsd.org">stsp@openbsd.org</a>&gt;</p>
157 742bb3a1 2022-10-24 stsp </section>
158 742bb3a1 2022-10-24 stsp </main>
159 742bb3a1 2022-10-24 stsp <div class="foot" role="doc-pagefooter" aria-label="Manual footer
160 2b1d45b9 2024-03-11 stsp line"><span class="foot-left"></span><span class="foot-date">March 11,
161 2b1d45b9 2024-03-11 stsp 2024</span> <span class="foot-os">OpenBSD 7.5</span></div>
162 742bb3a1 2022-10-24 stsp </body>
163 742bb3a1 2022-10-24 stsp </html>