4

Is there a way to set http proxy for capistrano ?

I have a deployment server behind proxy, capistrano just hangs while fetching from the github repository with https protocol.

How can I tell capistrano to use the proxy server ?

rangalo
  • 5,448
  • 8
  • 46
  • 66

2 Answers2

0

You can use the gateway option, when accessing your remote server through a proxy

set :gateway, "proxy-user@100.200.300.400"
ssh_options[:keys] = "~/.ssh/your-key"

Make sure you have added your remote servers ssh key into your github repo deploy keys.

You can also try the forward_agent option to make the remote server use your local machine ssh key to access github.

ssh_options[:forward_agent] = true

Hope this helps.

David Barlow
  • 4,914
  • 1
  • 28
  • 24
0

Configure git itself to use a proxy. As a user on the deployment server, use git directly to access github via the proxy. Setting $http_proxy seems to be the trick:

How do I pull from a Git repository through an HTTP proxy?

Setup the deployment user's environment correctly and it should allow git to work.

Community
  • 1
  • 1
Terry G Lorber
  • 2,932
  • 2
  • 23
  • 33