| GOT.CONF(5) | File Formats Manual | GOT.CONF(5) |
got.conf — Game of
Trees configuration file
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. Any lines beginning with a ‘#’ are treated as comments and ignored.
The available configuration directives are as follows:
got
commit and got import when operating on
this repository. Author information specified here overrides the
GOT_AUTHOR environment 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_id
signer-idgot tag -s
signer-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_signers
pathgot 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_signers option is set in
got.conf.
revoked_signers
pathgot tag
-V. Revoked identities are no longer considered
trustworthy and verification of relevant signatures will fail.remote
name {...}got fetch and got 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.conf files, overriding corresponding
repository-wide settings. This can avoid potentially undesirable
connections to remote repositories placed into the shared repository's
got.conf file by other users.
Information about a repository is declared in a block of options enclosed in curly brackets:
server
hostnamerepository
pathprotocol
schemeThe following protocol schemes are supported:
port
portprotocol will be
used.branch
{branch ...}got fetch
and got send should fetch from and send to the
remote repository by default. The list of branches specified here can
be overridden at the got fetch and
got send command lines with the
-b option.fetch_all_branches
yes | nogot fetch will
fetch all branches from the remote repository by default. If enabled,
this behaviour can be overridden at the got
fetch command line with the -b option,
and any branch configuration settings for this
remote repository will be ignored.reference
{reference ...}got
fetch should fetch by default, in addition to the branches and
tags that will be fetched. The list of references specified here can
be overridden at the got fetch command line
with the -R option. got
fetch will 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_references
yes | nogot
fetch when 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 fetch will 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
{...}fetch block may contain any of the
following configuration settings for use by got
fetch, overriding corresponding settings in the containing
remote name {...} block.
server
hostnamerepository
pathprotocol
schemeport
portbranch
{branch ...}send
{...}send block may contain any of the
following configuration settings for use by got
send, overriding corresponding settings in the containing
remote name {...} block.
server
hostnamerepository
pathprotocol
schemeport
portbranch
{branch ...}got.conf located in the root directory
of a Git repository supersedes any relevant settings in Git's
config file.
got.conf located in the
.got meta-data directory of a
got(1) work tree supersedes any relevant settings in the
repository's got.conf configuration file and Git's
config file.Configure author information:
author "Flan Hacker <flan_hacker@openbsd.org>"
Remote repository specification for the Game of Trees repository:
remote "origin" {
server git.gameoftrees.org
protocol git
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
}
}
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.
| January 31, 2025 | Debian |