# When deploying AutoTrained model: "Cannot access gated repo"

**URL:** <https://discuss.huggingface.co/t/when-deploying-autotrained-model-cannot-access-gated-repo/84652>\
**Category:** 🤗AutoTrain\
**Created:** [May 1, 2024, 9:52am UTC](https://discuss.huggingface.co/t/when-deploying-autotrained-model-cannot-access-gated-repo/84652 "2024-05-01T09:52:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brirrer](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@brirrer](https://discuss.huggingface.co/u/brirrer)\
**Post date:** [May 1, 2024, 9:52am UTC](https://discuss.huggingface.co/t/when-deploying-autotrained-model-cannot-access-gated-repo/84652/1 "2024-05-01T09:52:06Z")

</div>

I used the HuggingFace AutoTrain web interface (/spaces/\*\*\*) to finetune Meta-Llama-3-8B with default settings. However, when I attempt to deploy the trained model to a dedicated Inference Endpoint, I encounter an error during the endpoint creation.

```auto
You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/meta-llama/Meta-Llama-3-8B.
401 Client Error. (Request ID: Root=1-66320ceb-645c84aa50a9d06a4d3f73c7;920a0a14-1eee-4208-b8a6-d5fde77a10d8)

Cannot access gated repo for url https://huggingface.co/meta-llama/Meta-Llama-3-8B/resolve/main/config.json.
Access to model meta-llama/Meta-Llama-3-8B is restricted. You must be authenticated to access it.

```

_Note: I’ve access to Llama-3. But somehow this access isn’t passed when deploying._

---

<div class="post-metadata">

**Author:** ![abhishek](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abhishek/32/32360_2.png) [@abhishek](https://discuss.huggingface.co/u/abhishek)\
**Post date:** [May 1, 2024, 10:07am UTC](https://discuss.huggingface.co/t/when-deploying-autotrained-model-cannot-access-gated-repo/84652/2 "2024-05-01T10:07:25Z")

</div>

its an Endpoints issue. you should email: [api-enterprise@huggingface.co](mailto:api-enterprise@huggingface.co) with all the details.
