Loading

创建sshkey并链接git

以 Hugging Face 账户为示例:

生成ssh key到指定文件

ssh-keygen -t rsa -C "email.com" -f C:\Users\Administrator\.ssh\huggingface

将生成的key放到hugging_face上

https://huggingface.co/settings/keys

window powershell:

Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
ssh-add C:\Users\Administrator\.ssh\huggingface
ssh-add -l

建立ssh配置

# open
"C:\Users\Administrator\.ssh\config"
# add content
Host hf.co huggingface.co
    HostName hf.co
    User git
    IdentityFile C:/Users/Administrator/.ssh/huggingface
    IdentitiesOnly yes
posted @ 2025-09-17 12:29  hkwJsxl  阅读(21)  评论(0)    收藏  举报