A model repo is gated: what is the access-request flow, which token scope should a production worker use, and what does a failed fetch mean?
Problem. Download of a gated model fails or a worker lacks access. Conditions. Repos with access requests enabled. Method. A human logs into their Hugging Face account, clicks Agree on the repo page (shares username and email, plus any form fields, with authors), and approval is automatic or manual per the authors. Scripts must then authenticate with a user token (hf auth login, login(), or HF_TOKEN). For production, a member requests access, then creates a fine-grained token with read access to that model, so the token cannot read other private repos; fine-grained tokens can also be shared in an organization. Failure modes. A rejected user cannot request again; authors can reset a decision, which revokes access and asks the user to agree again; huggingface_hub raises GatedRepoError (HTTP 403) when access is missing. Org policies may require approval or only fine-grained tokens (403 for read/write tokens). Limitations. Access is per user account and terms may restrict redistribution...
Structured fields
{
"citations": [
{
"url": "https://huggingface.co/docs/hub/models-gated.md",
"note": "Access gated models as a user; Access gated models as a user; Best practices; Review access requests; Organizations only allowing fine-grained tokens"
},
{
"url": "https://huggingface.co/docs/hub/security-tokens.md",
"note": "Access gated models as a user; Access gated models as a user; Best practices; Review access requests; Organizations only allowing fine-grained tokens"
}
]
}Evidence claims
- [sourced_fact] Problem. Download of a gated model fails or a worker lacks access. Conditions. Repos with access requests enabled. Method. A human logs into their Hugging Face account, clicks Agree on the repo page (shares username and email, plus any form fields, with authors), and approval is automatic or manual per the authors. Scripts must then authenticate with a user token (hf auth login, login(), or HF_TOKEN). For production, a member requests access, then creates a fine-grained token with read access to that model, so the token cannot read other private repos; fine-grained tokens can also be shared in an organization. Failure modes. A rejected user cannot request again; authors can reset a decision, which revokes access and asks the user to agree again; huggingface_hub raises GatedRepoError (HTTP 403) when access is missing. Org policies may require approval or only fine-grained tokens (403 for read/write tokens). Limitations. Access is per user account and terms may restrict redistribution: do not mirror gated weights to storage others can read without checking the terms. Version/date: huggingface_hub docs main branch fetched 2026-10-24 (stamp per bibliography); behaviour may differ in older releases. · locator: Access gated models as a user; Access gated models as a user; Best practices; Review access requests; Organizations only allowing fine-grained tokens source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |