# Netlify-cli Error: Unauthorized

**URL:** <https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710>\
**Category:** Support\
**Tags:** netlify-cli, deployment\
**Created:** [March 5, 2021, 5:08pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710 "2021-03-05T17:08:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stan-Remus](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Stan-Remus](https://answers.netlify.com/u/Stan-Remus)\
**Post date:** [March 5, 2021, 5:08pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/1 "2021-03-05T17:08:55Z")

</div>

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

 ![Capture_net](https://global.discourse-cdn.com/netlify/original/3X/6/2/621a582e08364e8d258861871810d07f81a75ead.png)

---

<div class="post-metadata">

**Author:** ![kylesloper](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kylesloper/32/18398_2.png) [@kylesloper](https://answers.netlify.com/u/kylesloper)\
**Post date:** [March 5, 2021, 5:22pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/2 "2021-03-05T17:22:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stan-Remus](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Stan-Remus](https://answers.netlify.com/u/Stan-Remus)\
**Post date:** [March 5, 2021, 5:33pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/3 "2021-03-05T17:33:35Z")

</div>

I am the owner, i am logged in.

 ![Capture_net2](https://global.discourse-cdn.com/netlify/original/3X/b/c/bccf683aab1c6fd6559afce1025f004360dd15fe.png)

---

<div class="post-metadata">

**Author:** ![kylesloper](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kylesloper/32/18398_2.png) [@kylesloper](https://answers.netlify.com/u/kylesloper)\
**Post date:** [March 5, 2021, 5:36pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/4 "2021-03-05T17:36:26Z")

</div>

> [@Stan-Remus](#):
>
> I am the owner, i am logged in.

That’s good news. This post looks like a duplicate of [this post](https://answers.netlify.com/t/deploy-error-unauthorized/10518). Could you try logging out and then back in? It’s likely the auth token just need updating 🙂

---

<div class="post-metadata">

**Author:** ![Stan-Remus](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Stan-Remus](https://answers.netlify.com/u/Stan-Remus)\
**Post date:** [March 5, 2021, 5:40pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/5 "2021-03-05T17:40:38Z")

</div>

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

 ![Capture_net3](https://global.discourse-cdn.com/netlify/original/3X/9/9/991d87a46bc97d68d365380d2348e245186c6d89.png)

---

<div class="post-metadata">

**Author:** ![kylesloper](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kylesloper/32/18398_2.png) [@kylesloper](https://answers.netlify.com/u/kylesloper)\
**Post date:** [March 5, 2021, 5:43pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/6 "2021-03-05T17:43:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Stan-Remus](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Stan-Remus](https://answers.netlify.com/u/Stan-Remus)\
**Post date:** [March 5, 2021, 5:51pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/7 "2021-03-05T17:51:30Z")

</div>

Second time, I deleted the first site.

---

<div class="post-metadata">

**Author:** ![Stan-Remus](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Stan-Remus](https://answers.netlify.com/u/Stan-Remus)\
**Post date:** [March 5, 2021, 5:53pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/8 "2021-03-05T17:53:36Z")

</div>

Yes it did worked in the past

---

<div class="post-metadata">

**Author:** ![Stan-Remus](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Stan-Remus](https://answers.netlify.com/u/Stan-Remus)\
**Post date:** [March 5, 2021, 6:11pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/9 "2021-03-05T18:11:10Z")

</div>

Fix!

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

And it worked.  
THX for the time.

---

<div class="post-metadata">

**Author:** ![hillary](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hillary/32/21132_2.png) [@hillary](https://answers.netlify.com/u/hillary)\
**Post date:** [March 5, 2021, 6:49pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/10 "2021-03-05T18:49:48Z")

</div>

Hey there, @Stan-Remus

Welcome to the Netlify Forums 👋

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

---

<div class="post-metadata">

**Author:** ![bakethatcake](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@bakethatcake](https://answers.netlify.com/u/bakethatcake)\
**Post date:** [December 26, 2021, 9:08pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/11 "2021-12-26T21:08:50Z")

</div>

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

It works well for me !

Cheers

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [December 27, 2021, 4:03am UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/12 "2021-12-27T04:03:55Z")

</div>

Hi, @bakethatcake. That you for taking the time to share that solution. 👍

---

<div class="post-metadata">

**Author:** ![devcoder260802](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/devcoder260802/32/51401_2.png) [@devcoder260802](https://answers.netlify.com/u/devcoder260802)\
**Post date:** [July 21, 2023, 7:50pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/13 "2023-07-21T19:50:15Z")

</div>

it does noot workk please help

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [July 23, 2023, 1:19pm UTC](https://answers.netlify.com/t/netlify-cli-error-unauthorized/33710/14 "2023-07-23T13:19:40Z")

</div>

@devcoder260802, no duplicates please: [Netlify deploy TextHTTPError: Unauthorized - Support - Netlify Support Forums](https://answers.netlify.com/t/netlify-deploy-texthttperror-unauthorized/28591)
