[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-12-21 UTC。"],[],[],null,["If you are behind a corporate proxy or firewall, the Google Cloud CLI might not\nbe able to access the internet with its default settings.\n\nInstalling the gcloud CLI\n\nThe interactive gcloud CLI installers download components from the\ninternet as part of the installation process, which might not work correctly if\nyou're behind a proxy or firewall.\n\nFor a simpler installation process when proxy configuration is necessary, use\none of the self-contained [versioned archives](/sdk/docs/downloads-versioned-archives)\nto install the gcloud CLI. All previous versions of the\ngcloud CLI are also available to download from the\n[downloads archive](https://console.cloud.google.com/storage/browser/cloud-sdk-release).\n\nProxy configuration **Note:** The gcloud CLI respects the `http_proxy`, `https_proxy`, and `no_proxy` environment variables set in your proxy configuration; these control the proxy server used for plain HTTP connections, the proxy server used for HTTPS connections (typically more relevant for most gcloud CLI commands), and the domains not to proxy, respectively. Configure your `gcloud` proxy settings only if you would like to use a different proxy. If `gcloud` proxy settings are set, they override existing proxy configuration; this includes ignoring `no_proxy`.\n| **Tip:** If you see warnings or errors related to the `https_proxy` environment variable, it may be because you have specified e.g. `https_proxy=https://...` instead of `https_proxy=http://...`. The latter is needed since the gcloud CLI only supports HTTP proxies. Earlier versions of the gcloud CLI silently ignored this difference and would always attempt to contact the proxy via HTTP even if the proxy URL specified HTTPS.\n\nAfter you have the gcloud CLI installed, proxy settings can be\nconfigured using gcloud CLI properties by running `gcloud config`.\nFor more information on what gcloud CLI properties are and how to use\nthem, refer to the\n[properties](/sdk/docs/properties) page.\n\nTo start, set the type of proxy you are using and the address and port on which\nto reach it: \n\n gcloud config set proxy/type \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROXY_TYPE\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\n gcloud config set proxy/address \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROXY_IP_ADDRESS\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\n gcloud config set proxy/port \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROXY_PORT\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\n- The gcloud CLI supports the following values for `PROXY_TYPE`: `http`, `http_no_tunnel`, `socks4`, `socks5`\n- `PROXY_IP_ADDRESS` is the hostname or IP address of where the proxy can be reached.\n- `PROXY_PORT` is the port the proxy is running on (e.g. `8080`).\n\nFor an authenticated proxy, you will need to set your proxy username and\npassword using [properties](/sdk/docs/properties) as follows: \n\n gcloud config set proxy/username \u003cvar class=\"readonly\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eUSERNAME\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\n gcloud config set proxy/password \u003cvar class=\"readonly\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePASSWORD\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\nAlternatively, to avoid having the proxy credentials recorded in any logs (such\nas shell history or gcloud CLI logs) or in the\ngcloud CLI configuration file, you can set the properties using\nenvironment variables, as shown in the following sample: \n\n export CLOUDSDK_PROXY_USERNAME \u003cvar class=\"readonly\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eUSERNAME\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\n export CLOUDSDK_PROXY_PASSWORD \u003cvar class=\"readonly\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePASSWORD\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\nThe gcloud CLI won't store these values. This way, the credentials\ncan be stored in an encrypted file locally, or they can be stored in a secure\nnetwork location and retrieved when necessary.\n\nIf you are behind a proxy and you receive SSL handshake errors, it's likely\nthat your proxy is a man-in-the-middle proxy which uses a custom CA. You need\nto set the following property to point to your custom CA file: \n\n gcloud config set core/custom_ca_certs_file \u003cvar class=\"readonly\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-o\"\u003e[\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePATH_TO_CUSTOM_CA\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e]\u003c/span\u003e\u003c/var\u003e\n\nFor a full description of related properties, run\n[`gcloud topic configurations`](/sdk/gcloud/reference/topic/configurations)\nor [`gcloud config set`](/sdk/gcloud/reference/config/set)\nand look for **proxy** under the Available properties section."]]