File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed
Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 861861 - llm
862862 - optimization
863863 - quantization
864+
865+ - local : password-git-deprecation
866+ title : " Hub 上的 Git 操作不再支持使用密码验证"
867+ author : Sylvestre
868+ thumbnail : /blog/assets/password-git-deprecation/thumbnail.png
869+ date : August 25, 2023
870+ tags :
871+ - announcement
872+ - security
Original file line number Diff line number Diff line change 1+ ---
2+ title : Hub 上的 Git 操作不再支持使用密码验证
3+ thumbnail : /blog/assets/password-git-deprecation/thumbnail.png
4+ authors :
5+ - user : Sylvestre
6+ - user : pierric
7+ - user : sbrandeis
8+ translators :
9+ - user : chenglu
10+ ---
11+
12+ # Hugging Face Hub: Git 操作认证的重要变更
13+
14+ <!-- {blog_metadata} -->
15+ <!-- {authors} -->
16+
17+ 在 Hugging Face,我们一直致力于提升服务安全性,因此,我们将对通过 Git 与 Hugging Face Hub 交互时的认证方式进行更改。从 ** 2023 年 10 月 1 日** 开始,我们将不再接受密码作为命令行 Git 操作的认证方式。我们推荐使用更安全的认证方法,例如用个人访问令牌替换密码或使用 SSH 密钥。
18+
19+ ## 背景
20+
21+ 近几个月来,我们已经实施了各种安全增强功能,包括登录提醒和 Git 中对 SSH 密钥的支持,不过,用户仍然可以使用用户名和密码进行 Git 操作的认证。
22+
23+ 为了进一步提高安全性,我们现在转向基于令牌或 SSH 密钥的认证。与传统的密码认证相比,基于令牌和 SSH 密钥的认证有多个优点,包括独特、可撤销和随机特性,这些都增强了安全性和控制。
24+
25+ ## 立即需采取的行动
26+
27+ 如果你当前使用 HF 账户密码进行 Git 认证,请在 ** 2023 年 10 月 1 日** 之前切换到使用个人访问令牌或 SSH 密钥。
28+
29+ ### 切换到个人访问令牌
30+
31+ 你需要为你的账户生成一个访问令牌;你可以按照 [ 这个文档] ( https://huggingface.co/docs/hub/security-tokens#user-access-tokens ) 中提到的方法来生成一个访问令牌。
32+
33+ 生成访问令牌后,你可以使用以下命令更新你的 Git 仓库:
34+
35+ ```
36+ $: git remote set-url origin https://<user_name>:<token>@huggingface.co/<user_name>/<repo_name>
37+ $: git pull origin
38+ ```
39+
40+ 或者,如果你克隆了一个新的仓库,当你的 Git 凭证管理器要求你提供认证凭证时,你可以直接输入令牌来替代密码。
41+
42+ ### 切换到 SSH 密钥
43+
44+ 按照我们的 [ 指南文档] ( https://huggingface.co/docs/hub/security-git-ssh ) 生成 SSH 密钥并将其添加到你的账户。
45+
46+ 然后,你可以使用以下命令更新你的 Git 仓库:
47+
48+ ```
49+ $: git remote set-url origin git@hf.co:<user_name>/<repo_name>
50+ ```
51+
52+ ## 时间表
53+
54+ 以下是你在接下来几周内可以期待的内容:
55+
56+ - 今天:依赖密码进行 Git 认证的用户可能会收到电子邮件,敦促他们更新认证方法。
57+ - 10 月 1 日:个人访问令牌或 SSH 密钥将成为所有 Git 操作的强制要求。
58+
59+ 如需更多详情,可以通过 [ website@huggingface.co ] ( mailto:website@huggingface.co ) 联系支持团队,以解决你的疑问或顾虑。
You can’t perform that action at this time.
0 commit comments