【发布时间】:2014-07-14 14:44:09
【问题描述】:
我正在尝试使用 Capistrano 设置自动部署配置,但是当 Capistrano 尝试运行该命令时,我不断失败
git ls-remote -h git@bitbucket.org:vendor/repo.git
该用户的 SSH 密钥已在 Bitbucket 中正确设置,因为我可以在该服务器内对该用户执行 git clone git@bitbucket.org:vendor/repo.git 而不会出现问题。
我还在登台服务器之外测试了命令 ls-remote,在我日常使用 Git 的普通开发机器中,我发现它在 Bitbucket 上也不起作用(我的开发机器中的 SSH 密钥显然已设置好并且可以正常工作)。
实际输出为:
git ls-remote -h ssh://git@bitbucket.org/vendor/repo.git
ssh: connect to host bitbucket.org port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
虽然我可以在相同的目录上执行 push 和 pull 没有任何问题。
Bitbucket 上的 ls-remote 命令是怎么回事?除了常规配置之外,我还应该进行一些额外的配置以使其正常工作吗?
【问题讨论】:
标签: git ssh capistrano bitbucket