mirror of https://gitlab.com/gitlab-org/cli.git
d4663189c2 | ||
---|---|---|
.. | ||
Readme.md | ||
alias_config.go | ||
config.go | ||
config.yaml.lock | ||
config_file.go | ||
config_file_test.go | ||
config_mapping.go | ||
config_stub.go | ||
config_test.go | ||
file.go | ||
file_test.go | ||
gen.go | ||
host_config.go | ||
local_config.go | ||
local_config_test.go | ||
testing.go | ||
writefile.go | ||
writefile_test.go | ||
writefile_windows.go |
Readme.md
stage | group | info |
---|---|---|
Create | Code Review | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments |
Add a new configuration
To add a new configuration to config.yaml.lock
:
-
Add a head comment and a default value:
# head comment new_key: default_value
-
Add any configuration that is specific to a hostname or GitLab instance to the
hosts
section, in thegitlab.com
subsection:... # This configuration is specifically for GitLab instances hosts: gitlab.com: ... # This is a new config new_key: default_value ...
-
Add general configuration changes before the
hosts
section:... # Head comment new_key: default_value # Configuration specific for GitLab instances hosts: gitlab.com: ...
-
Run
make gen-config
orcd internal/config && go generate
. -
Most configuration keys can be overwritten by their corresponding environment variables. If the corresponding environment variable name differs from the configuration key's name, set the environment variable's name in the
config_mapping.go
file.