Search code examples
authenticationgoogle-cloud-platformgcloudgoogle-authentication

gcloud auth does not work out with windows WSL


I tried to authenticate with gcp using my personal account, but I can able to make it work entirely.

so I tried doing it using enter image description here

when I copy the same url and paste it into the browser, it is not working, see this enter image description here

Not sure why this is now happening, as it is the WSL - ubuntu machine on windows does not have web browser attached to terminal, so I had to do it manually paste into web which is not working.


Solution

  • I missed, instead of gcloud auth I need to do this -

    gcloud init --console-only
    

    which works out the way I expected. (I copied the url from console paste it into console where verification code)