Capistrano for http proxy

Is there a way to set an HTTP proxy for capistrano?

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

How can I tell capistrano to use a proxy server?

+4
source share
2 answers

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

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

Make sure you add the ssh key of the remote servers to your github repo deployment keys.

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

 ssh_options[:forward_agent] = true 

Hope this helps.

0
source

Configure git yourself to use a proxy. As a user on a deployment server, use git directly to access github through a proxy. Setting up $ http_proxy seems like a trick:

How can I fetch from a git repository through an HTTP proxy?

Set up your deployment environment correctly and it should let git work.

0
source

Source: https://habr.com/ru/post/1340971/


All Articles