I'm trying to deploy my Rails application with Capistrano but when it comes to "git ls-remote" i get the following error:
$ /usr/bin/env git ls-remote --heads [email protected]<server>:<project>.git /bin/bash: line 0: exec: corkscrew: not found DEBUG [a5205e2a] ssh_exchange_identification: Connection closed by remote host DEBUG [a5205e2a] fatal: The remote end hung up unexpectedly
If I try to run the command on the server there is no problem. I've also got a deploy ssh key for the "deployer" user in gitlab.
Corkscrew is located under ~/bin/corkscrew and is added to the PATH variable.
$ echo $PATH /home/deployer/.rbenv/shims:/home/deployer/.rbenv/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/deployer/bin $ corkscrew corkscrew 2.0 ([email protected]) usage: corkscrew <proxyhost> <proxyport> <desthost> <destport> [authfile] $ which corkscrew ~/bin/corkscrew
Here is my ~/.ssh/config:
Host * ProxyCommand corkscrew <server> 8088 %h %p ~/.ssh/proxyauth
While the ~/.ssh/proxyauth file contains the credentials of the proxy user.
If you need additional information please let me know.