我使用rails 5配置了capistrano 3.11 .

现在我必须更改我的配置,因为git的 生产环境 设置已更改:

问题是 - git落后于VPN Server .

通过终端(manualy):我可以使用这样的东西:

ssh -R 5000:git_url_local:443 user@ip_server

然后我可以在那里做:

git clone user@localip:50000/repo/files

我的Capistrano deploy.rb:

require 'net/ssh'
  require 'net/ssh/proxy/command'
  ssh_command = "ssh -R 5000: git_url_local:443 user@%h"
  proxy = Net::SSH::Proxy::Command.new(ssh_command)

  set :ssh_options, auth_methods: %w(publickey), proxy: proxy, user: fetch(:application)

但是运行cap staging deploy:

Pseudo-terminal will not be allocated because stdin is not a terminal.
-bash: line 1: SSH-2.0-Ruby/Net::SSH_5.0.2: No such file or directory