
這次我們想要操作HuggingFace的repository, 目標就是將 Repository 可用於常見的 Git 操作,例如克隆、分支和拉取。
為了達成這個目標,這邊我們有幾個步驟要去完成
1. 生產GPG Key
2. 將 GPG Key 加入 HuggingFace Hub
3. Git操作介面套用GPG Key
使用工具
1. gpgtools on Mac
2. SourceTree
3. HuggingFace Hub
安裝 gpgtools
安裝完成,啟動之後會像是這個樣子。

再來請點選 新增NEW
來新增密鑰,填入自己的資料。

找出公鑰來加入HuggingFace
再來請按 Export
,儲存檔案在用文字編輯的方式去查看檔案


請將內容完整複製,包含 -----BEGIN PGP PUBLIC KEY BLOCK-----
和 -----END PGP PUBLIC KEY BLOCK-----
。
之後請到HuggingFace的 管理頁面 > GPG Keys,將GPG公鑰加入。

使用SourceTree進行操作
當完成上面的步驟,SourceTree會自動抓取GPG,因此我們只要記得在project>那邊設置要使用GPG即可。
