【发布时间】:2013-10-04 20:06:41
【问题描述】:
我在服务器 A 上设置了 gitolite,我完全能够从本地计算机克隆存储库。
user@localmachine:$ git clone git@A:repo.git
不过,我无法从服务器 B 克隆相同的存储库
user@B:$ git clone git@A:repo.git
Cloning into 'repo'...
R access for repo DENIED to user
(Or there may be no repository at the given path. Did you spell it correctly?)
fatal: The remote end hung up unexpectedly
我在 ~/.ssh/config 中激活了 ForwardAgent,并且 ssh-add -l 在本地机器和服务器 B 上为我提供完全相同的输出。
有谁知道这可以解释什么?
【问题讨论】:
-
来自服务器
B的“ssh git@A”作为user是什么意思?它应该显示一个 gitolite 答案。 -
好的,我知道发生了什么。我忘了删除我在 B 上的 /etc/hosts 中对 A 进行了一些测试的条目。
-
好的,我已经添加了一个答案来说明这种情况。