【发布时间】:2016-07-06 19:30:20
【问题描述】:
我正在使用 bitbucket,我正在尝试使用以下代码克隆一个 repo:sudo git clone git@bitbucket.org:KassaK/mbf.git
我得到这个错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我到处寻找解决方案,但没有任何好处。
我按照https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html(到 Step)的说明进行操作,但总是出现此错误。
我尝试删除并重新安装 git,但还是一样。
对我有什么想法吗?谢谢 !
【问题讨论】:
-
在任何情况下你都不应该在这里使用
sudo。 -
如果您在需要存储库的位置(例如 Web 服务器目录)方面遇到权限问题,请先克隆到您的主目录,然后再克隆到
sudo mv