授權 gcloud CLI 使用設定的識別資訊提供者登入。
這項指令會向目前的機構驗證。
切換機構後,請再次執行指令。您必須在信任的憑證存放區中,安裝登入設定的憑證授權單位 (CA) 憑證。如果未安裝 CA 憑證,請使用 --login-config-cert 標記指定 CA 憑證的路徑。
裝置上必須有瀏覽器。
範例
To sign in with the configured identity provider, run:
gdcloud auth login
選用旗標
--login-config-cert string (Optional) Absolute file path to the CA certificate file to be used for fetching login-config over HTTPS connection
--no-browser (Optional) Use this flag to authenticate the gdcloud CLI on a machine without a web browser.
--skip-kubeconfig-update (Optional) Skip updating the kubeconfig file for management API servers.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003egdcloud auth login\u003c/code\u003e command authorizes the gdcloud CLI to sign in with the configured identity provider for the current organization.\u003c/p\u003e\n"],["\u003cp\u003eRe-running the command is necessary after switching organizations to re-authenticate with the newly selected organization.\u003c/p\u003e\n"],["\u003cp\u003eA CA certificate must be installed in the trusted certificates store, or the \u003ccode\u003e--login-config-cert\u003c/code\u003e flag can be used to specify its path.\u003c/p\u003e\n"],["\u003cp\u003eA web browser is typically required for this process, unless using the \u003ccode\u003e--no-browser\u003c/code\u003e flag to authenticate from a separate device.\u003c/p\u003e\n"]]],[],null,["# gdcloud auth login\n\nNAME\n----\n\ngdcloud auth login - Authorize the gdcloud CLI to sign in with the configured identity provider.\n\nSYNOPSIS\n--------\n\n gdcloud auth login [flags]\n\nDESCRIPTION\n-----------\n\nAuthorize the gdcloud CLI to sign in with the configured identity provider.\nThe command authenticates with the current organization.\nRun the command again after switching organizations.\nIt requires that the certificate authority (CA) certificate for the login config is installed\nin the trusted certificates store.\nIf the CA certificate is not installed, use the --login-config-cert flag to specify the path\nto find the CA certificate.\nIt requires a browser to exist on the device.\n\n### EXAMPLES\n\n To sign in with the configured identity provider, run:\n\n gdcloud auth login\n\n### OPTIONAL FLAGS\n\n --login-config-cert string (Optional) Absolute file path to the CA certificate file to be used for fetching login-config over HTTPS connection\n --no-browser (Optional) Use this flag to authenticate the gdcloud CLI on a machine without a web browser.\n --skip-kubeconfig-update (Optional) Skip updating the kubeconfig file for management API servers.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-reference/gdcloud) page."]]