git
The login user's ~/.gitconfig: author identity and any global git setting.
Materialises the login user’s ~/.gitconfig, so a workstation arrives with your git identity
already set — no git config --global inside the VM, ever.
toolconfigs:
- id: git
name: git
config:
userName: Ada Lovelace
userEmail: ada@example.comPair it with the git devtool (or
packages: [git]) to make sure git is actually installed.
config fields
| Field | Type | Description |
|---|---|---|
userName | string | user.name. |
userEmail | string | user.email. |
settings | object | Any global git setting, as dotted key to value. |
userName and userEmail are conveniences for the overwhelmingly common case;
settings reaches everything else.
settings keys and values
A key is section.key, or section.subsection.key when git’s syntax needs a
subsection. Values may be strings, numbers, or booleans — nothing else.
config:
settings:
init.defaultBranch: main
pull.rebase: true
core.editor: vim
url.git@github.com:.insteadOf: https://github.com/renders as:
[core]
editor = "vim"
[init]
defaultBranch = "main"
[pull]
rebase = true
[url "git@github.com:"]
insteadOf = "https://github.com/"Keys are sorted, so the output is stable; strings are quoted, booleans and numbers are
not. A malformed key (no section) or a null value is a clear error rather than a
broken config file.
Example
A personal identity layer you attach by label to every workstation you own:
apiVersion: workstations.ringleader.dev/v1
kind: WorkstationConfig
metadata:
name: my-git-identity
namespace: local
spec:
selector:
matchLabels:
owner: ada
priority: 200
devtools:
- name: git
toolconfigs:
- id: git
name: git
config:
userName: Ada Lovelace
userEmail: ada@example.com
settings:
init.defaultBranch: main
pull.rebase: trueBecause it selects by label rather than naming a workstation, the same config lands on
every workstation you label owner: ada — including ones you create tomorrow.
Notes
- The file is written at mode
0600, owned by the login user, and rewritten every time the workstation applies its configuration; edits inside the workstation revert. - Values may carry
${secret:NAME}references, resolved inside the workstation. Do not put a credential in a git URL — see SSHKey andsources[].git.credentialReffor cloning private repositories.