I have no problem logging into Hugging Face and to GitHub using conventional User/Password entry. I get access to gated public collections and can download individual files (e.g. Flux1-dev + needed extras).
How exactly does one login using a token? I know how to create tokens but not the means for entering them. This arises when a token is demanded to clone a repository. The standard username/password format is presented. Upon failure, a message states that this means of verification is obsolete and points to information which so far as I can tell does not spell out exactly what one should do.
1 Like
FLUX.1 is a gated model, so you need to get approval, and if you’re on Windows, you have to download Git and GitLFS and upgrade them beforehand, etc. But let’s set that aside for now…
I think doing it like this is better for Git.
python -m pip install huggingface_hub
hf auth login --add-to-git-credential # paste your HF token
This is a super common stumbling block — you’re right that Hugging Face and GitHub both deprecated plain username/password logins for git clone
and now require tokens. The trick is: you use the token as your password.
Here’s the step-by-step:
Hugging Face (git clone with token)
-
Create a token
-
Clone using HTTPS
Instead of your password, paste the token:
git clone https://huggingface.co/username/repo-name
When prompted for:
Example:
Username: __token__
Password: hf_xxxxxxxxxxxxxxxxxxxxx
-
Or set up credential helper
git config --global credential.helper store
Then after you enter the token once, it’s remembered.
GitHub (same pattern)
-
Generate a Personal Access Token (PAT) at GitHub → Settings → Developer settings → Tokens.
-
Use HTTPS clone:
git clone https://github.com/username/repo-name.git
Then: