[英]How to clone/push private repo on github?
我在 github 上創建了一個私人倉庫,我想將這個(空)倉庫克隆到我的本地計算機以將更改推送到。
我正在使用 MacOS Ventura 13.0。
我創建了一個密鑰對,並將公鑰上傳到Settings > SSH and GPG keys
。 我已將此密鑰添加到 ssh-agent 。 當我測試我的 SSH 連接到 GitHub 時,一切都按預期工作(我得到了首選的 output,比如我的用戶名和其他東西)。
當我嘗試克隆私人倉庫時,我得到以下 output:
user@my-mac <folder> % git clone git@github.com:<username>/<repo>.git
Cloning into '<folder>'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
可能有什么問題? 我應該將 SSH 密鑰添加到特定的 repo(在部署密鑰中)嗎?
GitHub 有此錯誤消息的頁面: 權限被拒絕(公鑰)
執行此處列出的步驟可能會解決您的問題。
如果你有 MacOS Ventura,你必須
從 OpenSSH v8.8 開始,禁用使用 SHA-1 的 RSA 簽名
/etc/ssh/sshd_config
並執行一些其他技巧,因為它已經在前一段時間概述過
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.