cap --version
Capistrano Version: 3.3.5 (Rake Version: 10.4.2)

ssh_options无法被最新的上限识别
ssh_options[:keys] = ["#{ENV['HOME']}/.ssh/dev.pem"], forward_agent: true

cap --trace development deploy
cap aborted!
NameError: undefined local variable or method `ssh_options' for main:Object

最新的上限不识别转发代理
ssh_options[:keys] = ["#{ENV['HOME']}/.ssh/dev.pem"], forward_agent: true

cap --trace development deploy
cap aborted!
SyntaxError: config/deploy.rb:13: syntax error, unexpected tLABEL
...dev.pem"], forward_agent: true
...                               ^

最佳答案

您的ssh_options不是有效的哈希。

应该是这样的:

ssh_options = {keys: ["#{ENV['HOME']}/.ssh/dev.pem"], forward_agent: true}

关于ssh - ssh_options在capistrano3中解析失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28336308/

10-13 02:10