当我这样做时git clone <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fe99978abe99978a968b9cd09d9193" rel="noreferrer noopener nofollow">[email protected]</a>:btholt/complete-intro-to-react.git
我得到了错误
Cloning into 'complete-intro-to-react'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
问题是什么?
最佳答案
当您使用 ssh URL 克隆存储库时, 它尝试使用您的公钥对您进行身份验证。 如果此身份验证失败,则克隆失败。
您可以让公钥身份验证正常工作, 或者您可以使用 https URL 而不是 ssh 克隆存储库,即:
git clone https://github.com/btholt/complete-intro-to-react
关于公共(public)仓库上的 git 权限错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39687911/