Print the location of the global configuration file.
Synopsis
Print where glab reads and writes its global configuration. The location depends on the platform and whether a legacy configuration directory exists, so use this command instead of hard-coding a path.
The command prints the path even if the file does not exist yet, so it is safe to run before the first glab auth login.
Use --dir to print the parent directory. Grant write access to that directory rather than to config.yml alone, because glab writes a temporary file in that directory first and then replaces config.yml with it.
Repository-local settings live in the repository's .git/glab-cli/config.yml and this command does not report them.
If no user configuration file exists, glab falls back to a read-only system-wide one. This command always reports the user location.
Your own configuration file must not be readable by anyone else, so it needs mode 600. A system-wide one, in a directory listed in XDG_CONFIG_DIRS, is read whatever its read permissions, but is refused if it is writable by group or others.
plaintext
glab config path [flags]
Examples
console
# Print the path to the global configuration file
glab config path
# Print the directory that holds the configuration file
glab config path --dir
# Open the configuration file in an editor
$EDITOR "$(glab config path)"
Environment variables
plaintext
GLAB_CONFIG_DIR: Set to a directory path to override the global configuration location.
Options
plaintext
--dir Print the configuration directory instead of the configuration file.
5info: To determine the technical writer assigned to the Stage/Group associated with this page, see <https://handbook.gitlab.com/handbook/marketing/product-and-technical-marketing/technical-writing/#assignments>
17Print where `glab` reads and writes its global configuration. The location depends on the platform and whether a legacy configuration directory exists, so use this command instead of hard-coding a path.
21Use `--dir` to print the parent directory. Grant write access to that directory rather than to `config.yml` alone, because `glab` writes a temporary file in that directory first and then replaces `config.yml` with it.
27Your own configuration file must not be readable by anyone else, so it needs mode `600`. A system-wide one, in a directory listed in `XDG_CONFIG_DIRS`, is read whatever its read permissions, but is refused if it is writable by group or others.
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.