Unable to connect to my netlify account via cli

Netlify init doesn’t login me into my account from the CLI. It redirects me to a page where the logo keeps spinning

Hi, @gfellah, this is because the Netlify CLI tool is trying to get an authorization token via the login session for our site in the browser. It only works if you are already logged into the Netlify web app (at https://app.netlify.com/).

To resolve this, first please login to the website. Then run the two following commands in the shell:

netlify logout
netlify login

If that doesn’t resolve the issue, please let us know.

I tried logging out and then logging in from the cmd but I cannot login. It just gets stuck at the spinner in the browser. I tried using different browsers but it does not help.

Hi, @faraznisar, I don’t see any issues with your account or user login.

Please check the following:

  • confirm you are logged into the Netlify web app (https://app.netlify.com/)
  • disable any/all browser extensions
  • clear the local browser cache

After doing all three things above, then try the logout/login with Netlify CLI again:

netlify logout
netlify login

If you still cannot login with Netlify CLI after doing this, please let us know.