【发布时间】:2016-12-13 17:28:20
【问题描述】:
我正在尝试使用 capistrano 部署我的应用程序,但遇到了一些问题。我的机器是 ec2 amazon,我在本地有 .pem。我可以毫无问题地执行 ssh 和运行命令,但是对于 cap 生产部署,我收到以下错误:
DEBUG [4f4633f7] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-hybrazil-production-ronanlopes.sh" ; /usr/bin/env git ls-remote --heads git@git@github.com:fneto/hybrazil.git )
DEBUG [4f4633f7] Permission denied (publickey).
DEBUG [4f4633f7]
DEBUG [4f4633f7] fatal: Could not read from remote repository.
DEBUG [4f4633f7]
DEBUG [4f4633f7]
DEBUG [4f4633f7] Please make sure you have the correct access rights
DEBUG [4f4633f7]
and the repository exists.
DEBUG [4f4633f7]
在我的 production/deploy.rb 上,我有这样的配置:
set :ssh_options, {
keys: %w(/home/ronanlopes/Pems/hybrazil-impulso.pem ~/.ssh/id_rsa),
forward_agent: true,
auth_methods: %w(publickey)
}
有什么想法吗?提前致谢!
【问题讨论】:
标签: amazon-ec2 capistrano