---
name: "gotsh"
section: "1"
platform: "linux"
package: "gotd"
version: "0.111-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gotsh"
---

# gotsh(1)

Game of Trees Shell

## NAME

**gotsh** – Game of Trees Shell

## SYNOPSIS

**gotsh** **-c** ‘**git-receive-pack** *repository-path*’

**gotsh** **-c** ‘**git-upload-pack** *repository-path*’

## DESCRIPTION

**gotsh** is the network-facing interface to [gotd(8)](/gotd/8.md). It implements the server-side part of the Git network protocol used by [git(1)](/git/1.md) and [got(1)](/got/1.md).

**gotsh** is not an interactive shell. **gotsh** is intended to be configured as the login shell of Git repository user accounts on servers running [gotd(8)](/gotd/8.md). If users require 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.

The users can then interact with [gotd(8)](/gotd/8.md) over the network. When users invoke commands such as **got** **send** and **got** **fetch** on client machines, [got(1)](/got/1.md) will connect to the server with [ssh(1)](/ssh/1.md). **gotsh** will facilitate communication between [gotd(8)](/gotd/8.md) running on the server machine and the [got(1)](/got/1.md) or [git(1)](/git/1.md) program running on the client machine.

Users running **gotsh** should not have access to Git repositories by means other than accessing the unix socket of [gotd(8)](/gotd/8.md) via **gotsh**.

It is recommended to restrict [ssh(1)](/ssh/1.md) features available to users of **gotsh**. See the EXAMPLES section for details.

## ENVIRONMENT

- GOTD\_UNIX\_SOCKET

  Set the path to the unix socket which [gotd(8)](/gotd/8.md) is listening on. If not specified, the default path */var/run/gotd.sock* will be used.

## EXAMPLES

[sshd\_config(5)](/sshd_config/5.md) 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:

```
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:

```
Match Group developers
    DisableForwarding yes
    PermitTTY no
```

Anonymous users can be given public read-only access by using a [gotd.conf(5)](/gotd.conf/5.md) 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)](/vipw/8.md) 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)](/sshd_config/5.md):

```
Match User anonymous
    PasswordAuthentication yes
    PermitEmptyPasswords yes
    DisableForwarding yes
    PermitTTY no
```

## SEE ALSO

gitwrapper(1), [got(1)](/got/1.md), [ssh(1)](/ssh/1.md), [gotd.conf(5)](/gotd.conf/5.md), [sshd\_config(5)](/sshd_config/5.md), [gotd(8)](/gotd/8.md)

## AUTHORS

Stefan Sperling ⟨*stsp@openbsd.org*⟩
