[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-02。"],[[["\u003cp\u003eConfigurations are named sets of key-value properties that control the behavior of the \u003ccode\u003egdcloud\u003c/code\u003e CLI, allowing for customized settings.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edefault\u003c/code\u003e configuration is created automatically and is suitable for single-project use, but multiple configurations can be created for managing different projects or organization console URLs.\u003c/p\u003e\n"],["\u003cp\u003eYou can switch between configurations using \u003ccode\u003egdcloud config configurations activate\u003c/code\u003e or by applying the \u003ccode\u003e--configuration\u003c/code\u003e flag to individual commands.\u003c/p\u003e\n"],["\u003cp\u003eConfigurations can be managed through the CLI to create, activate, list, set properties, describe, and delete named configuration sets.\u003c/p\u003e\n"],["\u003cp\u003eOnly one configuration can be active at a time, which determines the behavior of the \u003ccode\u003egdcloud\u003c/code\u003e CLI, and the active configuration cannot be deleted without first switching to another.\u003c/p\u003e\n"]]],[],null,["# Manage gdcloud CLI configurations\n\nA configuration is a named set of Distributed Cloud CLI properties. These\nproperties are key-value pairs, organized in sections, that govern the behavior\nof the gdcloud CLI.\n| **Tip:** If you work with just one project, the default configuration, named `default`, should be sufficient. To learn more about setting properties in a configuration to define per-organization or per-project settings such as the organization console URL or project to use, accessibility preferences, see [Manage properties](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-manage-properties).\n\nProperties that are commonly stored in configurations include the organization\nconsole URL and project ID. Configurations allow you to define and enable these\nand other settings together as a group.\n\nConfigurations are stored in your user config directory, typically\n`~/.config/gdcloud` on macOS and Linux. Also, note that the config directory\nmust be write-enabled.\n\nIf you have multiple configurations, you can choose to switch between them, or\nrun commands using a specific configuration with the\n`--configuration` flag. For more about switching configurations, refer to the\nsection on [Activate a configuration](#activate-config).\n\nTo read about configurations from the command-line and a complete list of\navailable properties and the sections they are in, run `gdcloud topic\nconfigurations`.\n\nDefault configuration\n---------------------\n\nThe gdcloud CLI initially creates a single configuration named\n`default`. You can set properties in your configuration by running the `gdcloud\ninit` command or by running `gdcloud config set` directly.\n\nMultiple configurations\n-----------------------\n\nThe single `default` configuration is suitable for many use cases. However, you\ncan also create additional configurations and switch between them as required\nusing `gdcloud config configurations activate`. The initial `default`\nconfiguration is created as a convenience, and is not required to use. You can\nname this and any additional configurations however you'd like.\n\nMultiple configurations are useful if you want to:\n\n- **Use multiple projects**: You can create a separate configuration for each project and switch between them as required.\n- **Use multiple organization console URLs**.\n- **Perform generally independent tasks**: For example, you can use one configuration to work on service A in one project and manage an unrelated service B in another project.\n\nCreate a configuration\n----------------------\n\nTo create a configuration, run: \n\n gdcloud config configurations create \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e\n\nYou must [activate](#activate-config) the new configuration after creation to\nuse it.\n\nActivate a configuration\n------------------------\n\nOnly one of your multiple configurations can be active at a given time. The\nactive configuration is the configuration whose properties will govern the\nbehavior of the gdcloud CLI.\n\nTo activate a new configuration or switch to a new active configuration, run: \n\n gdcloud config configurations activate \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e\n\n`gdcloud config list` will always displays you the properties in your active\nconfiguration.\n\nTo change the active configuration for a single command invocation, apply\nthe `--configuration` flag for any gdcloud CLI command: \n\n gdcloud auth print-identity-token --configuration=\u003cvar translate=\"no\"\u003eCONFIGURATION\u003c/var\u003e\n\nList configurations\n-------------------\n\nTo list the configurations in your gdcloud CLI, run: \n\n gdcloud config configurations list\n\nThe gdcloud CLI lists the configurations and shows which\nconfiguration is active: \n\n NAME ISACTIVE PROPERTIES.CORE.PROJECT PROPERTIES.CORE.ORGANIZATIONCONSOLEURL\n default False example-project-default https://console.default-org.example.com\n config-project-1 False example-project-1 https://console.org-1.example.com\n config-project-2 False example-project-2 https://console.org-2.example.com\n\nSetting configuration properties\n--------------------------------\n\nTo set and unset the properties in the active configuration, run: \n\n gdcloud config set project \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\n\nViewing configuration properties\n--------------------------------\n\nTo view the properties in a configuration, run: \n\n gdcloud config configurations describe \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e\n\nThe gdcloud CLI prints the configuration properties: \n\n is_active: false\n name: default\n properties:\n accessibility:\n screen_reader: \"false\"\n auth:\n login_config_cert_path: /tmp/root-web-tls-ca.cert\n core:\n organization_console_url: https://console.example.com\n project: example-project\n\nTo view properties in the active configuration, run: \n\n gdcloud config list\n\nDelete a configuration\n----------------------\n\nTo delete a configuration, run: \n\n gdcloud config configurations delete \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e\n\nYou can't delete an active configuration. To switch to another configuration\nbefore deleting, use `gdcloud config configurations activate` if required."]]