| GOT.CONF(5) | File Formats Manual | GOT.CONF(5) |
NAME¶
got.conf — Game of
Trees configuration file
DESCRIPTION¶
got.conf is the run-time configuration
file for got(1).
got.conf may be present in the root
directory of a Git repository for repository-wide settings, or in the
.got meta-data directory of a work tree to override
repository-wide settings for got(1) commands executed
within this work tree.
The file format is line-based, with one configuration directive
per line. Comments can be put anywhere in the file using a hash mark
(‘#’), and extend to the end of the current line. Arguments
names not beginning with a letter, digit or underscore, as well as reserved
words (such as author,
remote or
port), must be quoted. Arguments containing
whitespace should be surrounded by double quotes (").
The available configuration directives are as follows:
- Configure the author's name and email address for
got commitandgot importwhen operating on this repository. Author information specified here overrides theGOT_AUTHORenvironment variable.Because git(1) may fail to parse commits without an email address in author data, got(1) attempts to reject author information with a missing email address.
signer_idsigner-id- Configure a signer-id to sign tag objects. This key
will be used to sign all tag objects unless overridden by
got tag-ssigner-id.For SSH-based signatures, signer-id is the path to a file which may refer to either a private SSH key, or a public SSH key with the private half available via ssh-agent(1).
allowed_signerspath- Configure a path to the "allowed signers"
file which contains a list of trusted SSH signer identities. The file will
be passed to ssh-keygen(1) during verification of
SSH-based signatures with
got tag-V. The format of the "allowed signers" file is documented in the ALLOWED SIGNERS section of ssh-keygen(1).Verification of SSH-based signatures is impossible unless the
allowed_signersoption is set ingot.conf. revoked_signerspath- Configure a path to the optional "revoked
signers" file, which contains a list of revoked SSH signer
identities. This file is passed to ssh-keygen(1) during
signature verification with
got tag-V. Revoked identities are no longer considered trustworthy and verification of relevant signatures will fail. remotename {...}- Define a remote repository. The specified name can
be used to refer to the remote repository on the command line of
got fetchandgot send.When repositories are shared between multiple users on the system, it is recommended that users configure their trusted remote repositories in each of their work-trees'
got.conffiles, overriding corresponding repository-wide settings. This can avoid potentially undesirable connections to remote repositories placed into the shared repository'sgot.conffile by other users.Information about a repository is declared in a block of options enclosed in curly brackets:
serverhostname- Defines the hostname to use for contacting the remote repository's server.
repositorypath- Defines the path to the repository on the remote repository's server.
protocolscheme- Defines the protocol to use for communicating with the remote
repository's server.
The following protocol schemes are supported:
- git
- The Git protocol as implemented by the git-daemon(1) server. Use of this protocol is discouraged since it supports neither authentication nor encryption.
- ssh
- The Git protocol wrapped in an authenticated and encrypted ssh(1) tunnel. With this protocol the hostname may contain an embedded username for ssh(1) to use: user@hostname
- http
- The “smart” Git HTTP protocol. Not compatible with
servers using the “dumb” Git HTTP protocol.
The “smart” Git HTTP protocol is supported by
got cloneandgot fetch, but not bygot send. To send from a repository cloned over HTTP, add asendblock (see below) to ensure that the “ssh://” protocol will be used bygot send.Use of this protocol is discouraged since it supports neither authentication nor encryption.
- https
- The “smart” Git HTTP protocol wrapped in SSL/TLS.
portport- Defines the port to use for connecting to the remote repository's
server. The port can be specified by number or
name. The port name to number mappings are found in the file
/etc/services; see
services(5) for details. If not specified, the
default port of the specified
protocolwill be used. branch{branch ...}- Specify one or more branches which
got fetchandgot sendshould fetch from and send to the remote repository by default. The list of branches specified here can be overridden at thegot fetchandgot sendcommand lines with the-boption. fetch_all_branchesyes | no- This option controls whether
got fetchwill fetch all branches from the remote repository by default. If enabled, this behaviour can be overridden at thegot fetchcommand line with the-boption, and anybranchconfiguration settings for this remote repository will be ignored. reference{reference ...}- Specify one or more arbitrary references which
got fetchshould fetch by default, in addition to the branches and tags that will be fetched. The list of references specified here can be overridden at thegot fetchcommand line with the-Roption.got fetchwill refuse to fetch references from the remote repository's “refs/remotes/” or “refs/got/” namespace. In any case, references in the “refs/tags/” namespace will always be fetched and mapped directly to local references in the same namespace. mirror_referencesyes | no- This option controls the behaviour of
got fetchwhen updating references. Enabling this option can lead to the loss of local commits. Maintaining custom changes in a mirror repository is therefore discouraged.If this option is not specified or set to no,
got fetchwill map references of the remote repository into the local repository's “refs/remotes/” namespace.If this option is set to yes, all branches in the “refs/heads/” namespace will be updated directly to match the corresponding branches in the remote repository.
fetch{...}- An optional
fetchblock may contain any of the following configuration settings for use bygot fetch, overriding corresponding settings in the containingremotename {...} block.serverhostnamerepositorypathprotocolschemeportportbranch{branch ...}
send{...}- An optional
sendblock may contain any of the following configuration settings for use bygot send, overriding corresponding settings in the containingremotename {...} block.serverhostnamerepositorypathprotocolschemeportportbranch{branch ...}
FILES¶
- got.conf
- If present,
got.conflocated in the root directory of a Git repository supersedes any relevant settings in Git's config file. - .got/got.conf
- If present,
got.conflocated in the .got meta-data directory of a got(1) work tree supersedes any relevant settings in the repository'sgot.confconfiguration file and Git's config file.
EXAMPLES¶
Configure author information:
author "Flan Hacker <flan_hacker@openbsd.org>"
Remote repository specification for the Game of Trees repository:
remote "origin" {
server anonymous@got.gameoftrees.org
protocol ssh
repository got
branch { "main" }
}
Mirror the OpenBSD src repository from Github:
remote "origin" {
repository "openbsd/src"
server git@github.com
protocol git+ssh
mirror_references yes
}
Fetch changes via the Git protocol and send changes via the SSH protocol:
remote "origin" {
repository my_repo
server git.example.com
protocol git
send {
server git@git.example.com
protocol ssh
}
}
SEE ALSO¶
CAVEATS¶
got.conf offers no way to configure the
editor spawned by got commit, got
histedit, got import, or got
tag. This is deliberate and prevents potential arbitrary command
execution as another user when repositories or work trees are shared between
users. Users should set their VISUAL or
EDITOR environment variables instead.
| October 3, 2025 | Debian |