When I am trying to log in to my account in a Google Engine VM with “gcloud auth login
“, it jumps out a hint:
You are authorizing gcloud CLI without access to a web browser. Please run the following command on a machine with a web browser and copy its output back here. Make sure the installed gcloud version is 372.0.0 or newer. gcloud auth login --remote-bootstrap="https://acounts.google.com/xxxxxxxxxx" Enter the output of the above command:
So I copied this command and ran it on my laptop. But after finishing the process and pressing the “Allow” button, it just jumped to https://cloud.google.com/sdk/auth_success. There is no “output” for me to paste back into the original “cloud auth login
“.
Next time if you meet this same situation, please don’t panic. The answer is here: https://stackoverflow.com/a/49885635/5048046
We just need to add the argument “–no-launch-browser”:
gcloud auth login --no-launch-browser
and it will jump out to a web with “putout”