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.
source share