【发布时间】:2012-06-27 12:55:13
【问题描述】:
在我运行时在我的终端中
git clone -q git@codebasehq.com:zzzz/yyyy/plat.git
我可以克隆项目,但如果我运行
sudo git clone -q git@codebasehq.com:zzzz/yyyy/plat.git
并给出正确的密码,我得到了
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
知道这是为什么吗?
【问题讨论】:
-
要回答这个问题,可能需要比这里给出的更多信息。为什么会有人在
sudo下运行 git? -
我不认为这是一个 git 问题。您的 root 帐户可能有一个 ssh 密钥,它会尝试并导致服务器拒绝 ssh 连接。另一种解释是您的 root 用户禁用了密码验证。
标签: linux ruby-on-rails-3 git permissions