【发布时间】:2013-02-20 14:36:01
【问题描述】:
我在 MacBook Air 上设置了 GIT 和我的存储库。我正在尝试在我的 iMac 上克隆存储库。我的理解是我需要将我的密钥从 MBA 上的 /.ssh 文件夹复制到同一文件夹 iMac。
但是,当我尝试在 iMac 上克隆 repo 时,我收到以下错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我已经做了一些研究并证实了这一点......
我有最新版本的 GIT,并且我的 user.name 和 user.email 变量配置正确。 (New Mac - new SSH keys for github?)
.gitconfig 文件和父文件夹的所有权和权限是 r/w 并归我的用户所有。 (Trouble setting up Tower with my GitHub Account - error: could not lock config file)
我的 $HOME 环境变量指向我的用户工作目录。 (Trouble setting up git with my GitHub Account error: could not lock config file)
在这一点上,我完全没有想法,真的可以使用一些建议。
建议?
谢谢!
【问题讨论】:
-
您复制了哪些文件?
id_rsa和id_rsa.pub?另外,您确定您的 URI 正确吗? -
在文件名和 URI 上是。正如我在下面自己的回复中提到的,我的问题通过让 SSH 知道密钥的存在得到了解决。