news 2026/4/25 21:25:14

登录 HuggingFace 账户

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
登录 HuggingFace 账户

首先需要去官网申请一个 Access Token:https://huggingface.co/settings/tokens,申请的 token 为:

然后在需要登陆 hugginface 的虚拟环境中使用命令:

3.1.1 登录一个账户:

(lerobot-env) root@93162817432b:~# hf auth login _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_| _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_| To log in, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens . Enter your token (input will not be visible):(这里复制申请好的 Access Token) Add token as git credential? [y/N]: y Token is valid (permission: fineGrained). The token `token` has been saved to /root/.cache/huggingface/stored_tokens Cannot authenticate through git-credential as no helper is defined on your machine. You might have to re-authenticate when pushing to the Hugging Face Hub. Run the following command in your terminal in case you want to set the 'store' credential helper as default. git config --global credential.helper store Read https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage for more details. Token has not been saved to git credential helper. Your token has been saved to /root/.cache/huggingface/token Login successful. The current active token is: `token`

最后输出 Your token has been saved to /root/.cache/huggingface/token 和 Login successful. 就说明登录成功了!

报错:如果一直没反应,即输出如下:

(lerobot-env) root@93162817432b:~# hf auth login _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_| _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_| To log in, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens . Enter your token (input will not be visible): Add token as git credential? [y/N]: y 等待中... 等待中... 等待中... 等待中... 2000 years later... 还是等待中...

,说明网络连不上,在终端输入:

export HF_ENDPOINT=https://hf-mirror.com

即可 Login successful.--------------------------------------------------------------

3.1.2 列出已登录的账户:

(lerobot-env) root@93162817432b:~# hf auth list name | token ---------|--------------- * token | hf_****yamW

3.1.3 切换用户:

(lerobot-env) root@93162817432b:~# hf auth switch Available stored tokens: 1. token Enter the number of the token to switch to (or 'q' to quit):

注意:这里我只登录了一个用户,所以只列出了1. token,登陆多个才可以切换用户;

3.1.4 查看已登录的用户:

(lerobot-env) root@93162817432b:~# hf auth whoami user: xiaoarong Authenticated through private endpoint: https://hf-mirror.com

3.1.5 注销登录

hf auth logout # 效果不展示了,知道命令即可!
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/25 21:24:09

AI Agent Harness Engineering 在电商运营中的全流程自动化

AI Agent 全生命周期工程化(Harnessing):驱动电商运营全链路自动化从0到生产级落地 副标题: 从零搭建具备协同、监控、迭代能力的电商Agent平台,覆盖选品、内容、营销、客服、供应链预测五大核心场景第一部分&#xff…

作者头像 李华
网站建设 2026/4/25 21:15:12

如何快速掌握BBDown:免费高效的B站视频下载终极指南

如何快速掌握BBDown:免费高效的B站视频下载终极指南 【免费下载链接】BBDown Bilibili Downloader. 一个命令行式哔哩哔哩下载器. 项目地址: https://gitcode.com/gh_mirrors/bb/BBDown BBDown是一款专注于哔哩哔哩视频下载的命令行工具,能够让你…

作者头像 李华
网站建设 2026/4/25 21:14:23

鲸启智能邀您共赴CHIMA 2026 | 第30届中国医院信息网络大会

2026年4月,第30届中国医院信息网络大会暨医疗信息技术和产品展览会(CHIMA 2026)将在珠海国际会展中心盛大举办。大会以“传承创新赋能发展”为主题,聚焦AI临床应用与智慧医院建设,是国内医疗信息化领域规模最大、学术影…

作者头像 李华
网站建设 2026/4/25 21:13:20

IBM P570小机更换电源步骤

在HMC里查看报错:本次HMC里有一个电源相关报错,但是没有具体的sn号和位置码,查看电源后面的状态灯,不是两个常亮状态,而是一个不亮,一个闪烁,判断故障损坏,位置:----2z7t…

作者头像 李华
网站建设 2026/4/25 21:10:15

5步快速上手Umi-OCR:免费高效的离线文字识别终极方案

5步快速上手Umi-OCR:免费高效的离线文字识别终极方案 【免费下载链接】Umi-OCR OCR software, free and offline. 开源、免费的离线OCR软件。支持截屏/批量导入图片,PDF文档识别,排除水印/页眉页脚,扫描/生成二维码。内置多国语言…

作者头像 李华
网站建设 2026/4/25 21:07:58

GoFr框架:加速微服务开发的Go语言利器

目录 一、核心特性:简化微服务开发的五大支柱 1.1 零配置启动与约定优于配置 1.2 全栈可观测性:日志、追踪、指标一体化 1.3 多数据源支持与弹性扩展 二、技术架构:分层设计与模块化组件 三、未来展望:持续演进的云原生生态…

作者头像 李华