Private repo wget download not working why?
we try to download like below but not workingwget  https://REDACTED_TOKEN:REDACTED_TOKEN@huggingface.co/REDACTED_TOKEN/V33/resolve/main/SINGLE_VUC-000001.safetensorswhen opened from browser it works - a browser where account is logged inwhy could it be?we are gettingResolving huggingface.co (huggingface.co)... 13.32.110.77, 13.32.110.109, 13.32.110.28, ...
Connecting to huggingface.co (huggingface.co)|13.32.110.77|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Bearer realm="Authentication required", charset="UTF-8"
Reusing existing connection to huggingface.co:443.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
2023-09-23T03:15:18Z
I encountered the same problem, I also received such error when downloading llama2. But I got an email telling me I was logged into huggingface.Will you let me know if you find a solution?
2023-09-23T12:10:43Z
i couldn’t find  a direct solutionbut i found another way shared here :https://twitter.com/GozukaraFurkan/status/1704987722920669421
2024-06-12T23:44:55Z
The 401 Unauthorized error indicates that the URL requires authentication. You need to provide your Hugging Face credentials (API token) to access the file. You can usewgetwith an authorization header to include your Hugging Face API token. Here’s how to do it:Obtain your Hugging Face API token from your account settings on the Hugging Face website.Use thewgetcommand with the--headeroption to include your token:wget --header=“Authorization: Bearer YOUR_HUGGING_FACE_API_TOKEN”https://huggingface.co/stabilityai/stable-diffusion-3-medium/resolve/main/sd3_medium_incl_clips_t5xxlfp8.safetensorsReplaceYOUR_HUGGING_FACE_API_TOKENwith your actual Hugging Face API token.Make sure to keep your API token secure and do not expose it in public repositories or logs.
2024-07-24T14:03:47Z
Just in case anyone is still coming here like I did and is confused because even when using the afore mentioned API header method, your command is now returning 403 Forbidden:Make sure you give the API token access to your repositories.chrome_TygqTTMPj31818×1401 154 KB
2024-08-02T18:28:39Z
thanks, it workedyou only need to change the “” characters into simple double quotes or it will give an errorwget --header=“Authorization: Bearer YOUR_HUGGING_FACE_API_TOKEN”copy the above and it works