Difficult logging into SDK for Google Cloud Platform

My intention was to compare GCP with AWS. But had authentication challenge right off the gun.
I opened an account and brought up an instance no problem. But then downloaded the SDK (linux version). After issuing the gcloud init – I got to the stage where it opened up a browser window with a generated URI… but then the browser just cycled issuing the oauth request. No error message was evident and the log didnt reveal anything (just echoed back the URL).

update: console showed a 304 http response (not modified?)

Answer

Please enter the following command “sudo gcloud init” instead of “gcloud init” on your terminal. Because there are some privileges with the gcloud init command to access your browser.

If you want to authentication, please enter “sudo gcloud auth login” , it opens your browser to select your account id on google cloud platform to access the services.

Attribution
Source : Link , Question Author : williamk , Answer Author : Vijay Kumar Sharma

Leave a Comment