【发布时间】:2014-02-26 15:03:41
【问题描述】:
我很难配置 Capistrano 3.1 来部署托管在 Github 上的应用。
我正在关注Capistrano Documentation,并且我已经成功完成了第一步(从工作站到服务器的 SSH 密钥),在第二步(从我们的服务器到存储库主机)我能够成功运行 ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:my_user/my_repo.git' :
18f38afz261df35d462f7f4e2ca847d22f148a06 HEAD
18f38afz261df35d462f7f4e2ca847d22f148a06 refs/heads/master
但是,ssh deploy@one-of-my-servers.com 'git ls-remote git@github.com:my_user/my_repo.git' 失败:
Permission denied (publickey).
Capistrano 文档建议
如果您收到错误“主机密钥验证失败”。登录到您的服务器并以部署用户身份运行命令 ssh git@github.com 以将 github.com 添加到已知主机列表中。
所以,我试过了,但我明白了
ssh git@github.com
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
Permission denied (publickey).
而且我基本上无法成功访问 Github 存储库。
SSH 文档说明:
-A Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file.
如何在配置文件中为每个主机指定?
我的本地机器运行 Mac OSX Mavericks。 VPS 运行 Ubuntu 12.04
谢谢。
【问题讨论】:
-
查看另一个可能的原因(和解决方案):serverfault.com/questions/404447/…
标签: github ssh capistrano3