cli/internal/config
Viacheslav Vasilyev d4663189c2 feat: allow to provide custom client-id 2024-04-24 19:27:12 +00:00
..
Readme.md refactor: autogenerate config stub from lockfile 2023-04-27 14:29:22 +00:00
alias_config.go fix(deps): update github.com/xanzy/go-gitlab to v0.101.0 2024-04-04 14:24:13 -04:00
config.go chore: remove deprecated `config init` command 2023-12-14 17:51:26 +00:00
config.yaml.lock refactor: autogenerate config stub from lockfile 2023-04-27 14:29:22 +00:00
config_file.go refactor: autogenerate config stub from lockfile 2023-04-27 14:29:22 +00:00
config_file_test.go test: fix issue with environment variables being set 2024-04-20 16:19:20 -05:00
config_mapping.go feat: allow to provide custom client-id 2024-04-24 19:27:12 +00:00
config_stub.go refactor: autogenerate config stub from lockfile 2023-04-27 14:29:22 +00:00
config_test.go test: fix issue with environment variables being set 2024-04-20 16:19:20 -05:00
file.go internal/config: migrate local config to `.git/glab-cli` 2021-08-10 03:56:35 +00:00
file_test.go chore(dependency): remove alecthomas/assert module 2023-10-05 13:20:13 +00:00
gen.go refactor: autogenerate config stub from lockfile 2023-04-27 14:29:22 +00:00
host_config.go fix: better config package to enhance test and restructuring (#223) 2020-09-20 19:58:37 +00:00
local_config.go fix(deps): update github.com/xanzy/go-gitlab to v0.101.0 2024-04-04 14:24:13 -04:00
local_config_test.go Merge security fix for v1.26.0 release 2023-03-10 19:00:54 +00:00
testing.go chore: re-add linting/formatting job to ci 2022-11-17 18:36:09 +00:00
writefile.go chore(dependency): update to github.com/google/renameio/v2 2024-01-09 15:52:48 +00:00
writefile_test.go chore(dependency): update to github.com/google/renameio/v2 2024-01-09 15:52:48 +00:00
writefile_windows.go chore: fix ioutil lint deprecations 2022-11-30 12:45:08 +00:00

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:

  1. Add a head comment and a default value:

    # head comment
    new_key: default_value
    
  2. Add any configuration that is specific to a hostname or GitLab instance to the hosts section, in the gitlab.com subsection:

    ...
    # This configuration is specifically for GitLab instances
    hosts:
      gitlab.com:
        ...
        # This is a new config
        new_key: default_value
    ...
    
  3. Add general configuration changes before the hosts section:

    ...
    # Head comment
    new_key: default_value
    # Configuration specific for GitLab instances
    hosts:
      gitlab.com:
    ...
    
  4. Run make gen-config or cd internal/config && go generate.

  5. 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.