【发布时间】:2016-05-13 06:12:54
【问题描述】:
命令
git clone 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 -T git@github.com
它工作..
我的 id_rsa.pub 刚刚添加到 github 上,当我使用上面的命令时,我可以看到我的 ssh 密钥下的标签Last used within the last day
所以我不明白我的 git 出了什么问题。感觉太糟糕了 T^T。我早上只是在解决这个问题并寻找解决方案。
我的系统是 macOS
感谢您的回答。
【问题讨论】:
-
你见过this SO post吗?有 22 个答案,看起来都很有帮助。
-
那是私有仓库吗?您可以使用您的公钥登录到另一台服务器吗? (您了解如何设置公钥身份验证吗?)