Netlify-cli Error: Unauthorized

I try to deploy a secont project and I’ve got a Error: Unauthorized.

Can you try running ntl status or netlify status this will tell you what user is logged in including git user.

I am the owner, i am logged in.

That’s good news. This post looks like a duplicate of this post. Could you try logging out and then back in? It’s likely the auth token just need updating :slightly_smiling_face:

I tried it befor I came to this forum, and I tried it again now. :frowning:

Is this the first time you are trying to deploy or has it worked in the past.

Have you tried unlinking and re-linking the site?

Second time, I deleted the first site.

Yes it did worked in the past


  1. Netlify init (in directory).
  2. npm run buid. (react project).
  3. netlify deploy

And it worked.
THX for the time.

1 Like

Hey there, @Stan-Remus

Welcome to the Netlify Forums :wave:

Thanks for sharing your solution here! It will help future community members who may get stuck on a similar obstacle.

Try to delete the site ID from /your_project/.netlify/state.json and deploy again!

It works well for me !


Hi, @bakethatcake. That you for taking the time to share that solution. :+1: