Back to articles
AIHugging Face Blog

Deprecation of Git Authentication using password

Back to Articles Hugging Face Hub: Important Git Authentication Changes Published August 25, 2023 Update on GitHub Upvote 52 +46 Sylvestre Bcht Sylvestre Follow Pierric Cistac pierric Follow Simon Brand...

The RSS feed only provided an excerpt. FlowMarket recovered the public content available from the original page without bypassing restricted content.

Deprecation of Git Authentication using password

Hugging Face Hub: Important Git Authentication Changes

  • +46
Sylvestre Bcht
Pierric Cistac
Simon Brandeis

Because we are committed to improving the security of our services, we are making changes to the way you authenticate when interacting with the Hugging Face Hub through Git. Starting from October 1st, 2023 , we will no longer accept passwords as a way to authenticate your command-line Git operations. Instead, we recommend using more secure authentication methods, such as replacing the password with a personal access token or using an SSH key.

Background

In recent months, we have implemented various security enhancements, including sign-in alerts and support for SSH keys in Git. However, users have still been able to authenticate Git operations using their username and password. To further improve security, we are now transitioning to token-based or SSH key authentication. Token-based and SSH key authentication offer several advantages over traditional password authentication, including unique, revocable, and random features that enhance security and control.

Action Required Today

If you currently use your HF account password to authenticate with Git, please switch to using a personal access token or SSH keys before October 1st, 2023 .

Switching to personal access token

You will need to generate an access token for your account; you can follow https://huggingface.co/docs/hub/security-tokens#user-access-tokens to generate one.

After generating your access token, you can update your Git repository using the following commands:

$: git remote set-url origin https://<user_name>:<token>@huggingface.co/<repo_path>
$: git pull origin

where <repo_path> is in the form of:

  • <user_name>/<repo_name> for models
  • datasets/<user_name>/<repo_name> for datasets
  • spaces/<user_name>/<repo_name> for Spaces

If you clone a new repo, you can just input a token in place of your password when your Git credential manager asks you for your authentication credentials.

Switching to SSH keys

Follow our guide to generate an SSH key and add it to your account: https://huggingface.co/docs/hub/security-git-ssh

Then you'll be able to update your Git repository using:

$: git remote set-url origin git@hf.co:<repo_path> # see above for the format of the repo path

Timeline

Here's what you can expect in the coming weeks:

  • Today: Users relying on passwords for Git authentication may receive emails urging them to update their authentication method.
  • October 1st: Personal access tokens or SSH keys will be mandatory for all Git operations.

For more details, reach out to HF Support to address any questions or concerns at website@huggingface.co

Community

и как это г использовать

This is an awful decision

this is a shittiest one!

Image de l'article

clone repo :

git clone https://user_name:token@huggingface.co/xxxx

  • 5 replies
Image de l'article

Thanks brother, you saved me hours of headaches :D

passwordless authentication is more secure, in fact using token as password makes it "bruteforceless"

Image de l'article

this shit sucks

give us an exmaple please? its very confusing

what exactly do i put? what constitutes repo?

Image de l'article

É de cair o cú da bunda

For someone struggling like me, try this :

pip install -U "huggingface_hub[cli]"

hf auth login --add-to-git-credential paste your token and you are set

· Sign up or log in to comment

  • +40

Need an n8n workflow or help installing it?

After the briefing, move to execution: find an n8n template or a creator who can adapt it to your tools.

Source

Hugging Face Blog - huggingface.co

View original publication