GOTSH(1)
β¨ GOTSH(1) β¨
okay bestie, buckle up, it's the General Commands Manual era and today's main character is gotsh β aka Game of Trees Shell π
like yes it has a whole fancy name and yes it is THAT girl.
πΈ NAME πΈ
gotsh β Game of Trees Shell π¦
β¨ SYNOPSIS β¨
gotsh -c βgit-receive-pack repository-pathβ
gotsh -c βgit-upload-pack repository-pathβ
gotsh -c βweblogin [hostname]β
π DESCRIPTION π
so gotsh is literally the network-facing interface to gotd(8). no cap. it implements the server-side part of the Git network protocol that git(1) and got(1) use. it's giving backend queen π
and listen β gotsh is not an interactive shell. not me expecting a prompt π. gotsh is meant to be configured as the login shell of Git repository user accounts on servers running gotd(8). if users need a different login shell, gotsh can be installed in the command search path under the names git-receive-pack and git-upload-pack, OR gitwrapper(1) can be used to select the appropriate command to run automatically. options, we love to see it β¨
then users can interact with gotd(8) over the network π«Ά. when users invoke commands such as got send and got fetch on client machines, got(1) will connect to the server with ssh(1). gotsh will facilitate communication between gotd(8) running on the server machine and the got(1) or git(1) program running on the client machine. it's giving glue that holds the whole group chat together fr fr.
β οΈ important bestie: users runninggotshshould not have access to Git repositories by any means other than accessing the unix socket ofgotd(8)viagotsh. that's the vibe check. do not pass go, do not collect repos another way.
the weblogin command provides user authentication for gotwebd(8) π. gotsh will connect to gotwebd(8) and obtain a login URL which allows browsing private repositories the user has been granted read access to in gotwebd.conf(5). if multiple servers are declared in gotwebd.conf(5) the hostname parameter is required and indicates the desired virtual host to use in the URL. if no hostname is specified and only one server is declared in gotwebd.conf(5) then the name of this server will be used in the URL. iconic behaviour honestly π
and it is recommended to restrict ssh(1) features available to users of gotsh. see the βEXAMPLESβ section for details. yes there's homework, but it's cute homework ππ
π ENVIRONMENT π
GOTD_UNIX_SOCKETβ sets the path to the unix socket whichgotd(8)is listening on π. if not specified, the default path/var/run/gotd.sockwill be used. defaults, our beloved π
π EXAMPLES π
okay this is the part where we actually do stuff, bestie. sshd_config(5) directives such as the following are recommended to protect the server machine and any systems reachable from it, especially if anonymous users are allowed to connect (like, be careful okay π):
Match User developer
DisableForwarding yes
PermitTTY no
it can be convenient to add all relevant users to a common group, such as βdevelopersβ, and then use this group as the Match criteria β group project but make it secure π«Ά:
Match Group developers
DisableForwarding yes
PermitTTY no
anonymous users can be given public read-only access by using a gotd.conf(5) access rule such as the following:
repository "public" {
path "/var/git/public.git"
permit ro anonymous
}
the anonymous user account should have a publicly known password, OR can be set up with an empty password in which case the user's vipw(8) entry would look similar to this example π:
anonymous::1002:1002::0:0:Anonymous:/home/anonymous:/usr/local/bin/gotsh
π¨ use of an empty password must be explicitly allowed in sshd_config(5):
Match User anonymous
PasswordAuthentication yes
PermitEmptyPasswords yes
DisableForwarding yes
PermitTTY no
and to tell security(8) to ignore the empty password, set PASSWDSKIP to the following in /etc/daily.local:
PASSWDSKIP="anonymous:/usr/local/bin/gotsh"
obtain a gotwebd(8) login URL for got.example.com:
$ ssh got.example.com weblogin
if the web server at got.example.com serves virtual hosts then two hostnames must be provided π« . one for ssh(1) to connect to, and another to identify the virtual host served by gotwebd(8):
$ ssh got.example.com weblogin got.example.com
in practice both hostnames will often be the same, but this is not guaranteed π. there is no reliable way determine the desired virtual host automatically. (yes that's the original wording, no I will not fix it, I respect the source β¨.) an ssh_config(5) entry like the following can save some typing β lazy girlies rise up π
:
Host weblogin
Hostname got.example.com
RemoteCommand weblogin %h
the following command is now equivalent to the above:
$ ssh weblogin
ate. no crumbs. π
π¦ SEE ALSO π¦
gitwrapper(1), got(1), ssh(1), gotd.conf(5), gotwebd.conf(5), sshd_config(5), gotd(8), gotwebd(8), security(8)
π AUTHORS π
Stefan Sperling <stsp@openbsd.org> β thank you for your service, legend π
and that's the whole page bestie, we did it πβ¨ this came to you from the Debian girly, sourced at version $Mdocdate$, and it's officially GOTSH(1) forever and always. mwah π bye pookie π«Ά
π¦ where this page comes from
- alpine 3.24: got-doc 0.126-r0 Β· ISC
- nixos 26.05: got 0.125
- nixpkgs unstable: got 0.129
- ubuntu stonking: gotd 0.126-1build1 Β· ISC
- Copyright (c) 2022 Stefan Sperling
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms