When I attempt to authenticate with GCloud using the command gcloud auth login
, I receive the following error message:
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=3...
ERROR: There was a problem with web authentication. Try running again with --no-browser.
ERROR: (gcloud.auth.login) Could not reach the login server. A potential cause of this could be because you are behind a proxy. Please set the environment variables HTTPS_PROXY and HTTP_PROXY to the address of the proxy in the format "protocol://address:port" (without quotes) and try again.
How to resolve?
This issue arose for me when I'd set the environment variables $HTTP_PROXY
and $HTTPS_PROXY
.
The solution is simply to unset the variables:
unset HTTP_PROXY
unset HTTPS_PROXY
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.