successfully logged in and granted access to the model yet unable to access it!

#4
by hshallal - opened

I am successfully logged in hf and granted access to this mode, yet when I try to download it, I get the following error:

OSError: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/fdtn-ai/antares-1b.
401 Client Error. (Request ID: Root=1-6a67572b-305df563069928a53995724d;e9120271-c8d8-4c78-b7eb-4a65d1b6ab50)

Cannot access gated repo for url https://huggingface.co/fdtn-ai/antares-1b/resolve/main/config.json.
Access to model fdtn-ai/antares-1b is restricted. You must have access to it and be authenticated to access it. Please log in.

Cisco Foundation AI org
β€’
edited 3 days ago

Hi, thank you so much for reaching out, and apologies for the hassle getting set up! Glad you're in and approved on the repo. That 401 means your local session isn't authenticating with a token that carries your access. Being logged in on the website isn't enough for the download client, you just need to create an HF token and use it. Two options:

Option A, Fine-grained token (scoped, recommended):

  • Go to https://huggingface.co/settings/tokens β†’ Create new token β†’ Fine-grained.
  • Under Repositories permissions, search for fdtn-ai/antares-1b and select it.
  • Check "Read contents of selected repos".
  • Create the token and copy it.

Option B, Classic read token (simplest):

  • Same page β†’ Create new token β†’ Read.
  • Create the token and copy it.

Once you have the key, confirm it can reach the model (paste your token in place of hf_xxx):

curl -sI -H "Authorization: Bearer hf_xxx" https://huggingface.co/fdtn-ai/antares-1b/resolve/main/config.json | head -1

HTTP/1.1 200 OK means the token works and the download will go through. A 401/403 means the token is missing the repo read permission.

Let me know if you're able to access it.

That worked, thank you so much

hshallal changed discussion status to closed

Sign up or log in to comment