title: Cannot autheticate gcloud
body: <p>I am trying to authenticate my <code>gcloud</code>. I can run <code>gcloud init</code> and everything goes smoothly but the terminal does not proceed beyond giving me the link to open the authentication browser link.</p>
  <p>I run:</p>
  <pre><code>gcloud init
  </code></pre>
  <p>and, I get</p>
  <pre><code>Welcome! This command will take you through the configuration of gcloud.
  
  Your current configuration has been set to: [default]
  
  You can skip diagnostics next time by using the following flag:
    gcloud init --skip-diagnostics
  
  Network diagnostic detects and fixes local network connection issues.
  Checking network connection...done.                                                      
  Reachability Check passed.
  Network diagnostic passed (1/1 checks passed).
  
  You must log in to continue. Would you like to log in (Y/n)?  Y
  </code></pre>
  <p>I proceed with Y and it automatically opens the browser tab and asks me to log in to my google account. meanwhile the terminal has reached</p>
  <pre><code>Your browser has been opened to visit:
  
      https://accounts.google.com/o/oauth2/auth?response_type=code&amp;client_id=32555940559.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&amp;scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&amp;state=nAOd8W8sIVuPPQyBtbdolPPSAUctM67&amp;access_type=offline&amp;code_challenge=pBvvLeTf4D1x7AuhvuOkCsv8Yxq6-ldWOKs5AP3YPn0&amp;code_challenge_method=S256
  </code></pre>
  <p>I successfully log in to my google account and it gives me</p>
  <pre><code>You are now authenticated with the gcloud CLI! 
  </code></pre>
  <p>But, the terminal remains stuck at the screen and nothing happens. I forcibly quit it with ctrl+c</p>
  <p>I run</p>
  <pre><code>gclouds projects list
  
  </code></pre>
  <p>and I get</p>
  <pre><code>ERROR: (gcloud.projects.list) You do not currently have an active account selected.
  Please run:
  
    $ gcloud auth login
  
  to obtain new credentials.
  
  If you have already logged in with a different account:
  
      $ gcloud config set account ACCOUNT
  
  to select an already authenticated account to use.
  </code></pre>
  <p>--no-browser or --no-console options do not help as well as nothing happens post pasting the key in my terminal. And I have to forcibly quit the browser and then I find out that gcloud has not been authenticated.</p>
  <p>How to get my gcloud authenticated?</p>