Git is definitely installed on the server and in the PATH. It is in 
/usr/bin. 
I can also run a command such as below -
ssh -i <my key> m...@myhost.com 'which git' 
and I get back a valid response. Same is true if I run 'git --version'

I've also tried to explicitly state the path but no luck.

Any suggestions on how I would go debugging this further ? Because I've run 
the same command via ssh and it runs fine returning me valid results after 
executing the git command.
i.e. 
ssh -i <my key> m...@myhost.com '/usr/bin/env git ls-remote 
g...@git.myhost.com:ich/ich_mvp.git'
works fine but not from within capistrano.

On Friday, February 14, 2014 11:41:17 AM UTC-6, Lee Hambley wrote:
>
> ​Git isn't installed (or is installed, and not on the PATH) of the server:
>
>
>> *DEBUG [d6bfd978]  /usr/bin/env: git**DEBUG [d6bfd978]  : No such file 
>> or directory*
>
>
> Lee Hambley
> --
> http://lee.hambley.name/
> +49 (0) 170 298 5667
>
>
> On 14 February 2014 16:38, npatil <nirmal...@gmail.com <javascript:>>wrote:
>
>>
>> Hi all, 
>> I've had Cap 3 based deployment working fine on a different rails 
>> project/env some months ago. 
>>
>> But I'm running into an issue in a new rails project / env and look for 
>> some help.
>> The git command works fine via ssh but not via Capistrano. (See logs 
>> below).
>> I suspect this is related to the default behavior - non-interactive, 
>> non-login shell.
>> I've read through 
>> this<http://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/>
>>  link. 
>>
>> Some workarounds/hacks, I've tried:
>>
>> #set :default_shell, "bash -l"
>>
>> #set :pty, true
>>
>> set :default_env, { path: 
>> "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }
>>
>> Any suggestions most appreciate.
>>
>> Thanks.
>>
>> Versions:
>>
>>    - Ruby 2.0.0
>>    - Capistrano 3.0.1
>>    - Rake / Rails / etc 4.0.0 
>>
>> Platform:
>>
>>    - Working on - Mac OS X
>>    - Deploying to - Ubuntu
>>
>> Logs:
>>
>> INFO [a83ebb49] Running /usr/bin/env mkdir -p /tmp/ich_mvp/ on 
>> dev-ich-db.myhost.com
>> DEBUG [a83ebb49] Command: ( 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
>> /usr/bin/env mkdir -p /tmp/ich_mvp/ )
>>  INFO [d1c6b4e8] Running /usr/bin/env mkdir -p /tmp/ich_mvp/ on 
>> dev-ich.myhost.com
>> DEBUG [d1c6b4e8] Command: ( 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
>> /usr/bin/env mkdir -p /tmp/ich_mvp/ )
>>  INFO [a83ebb49] Finished in 1.685 seconds with exit status 0 
>> (successful).
>> DEBUG Uploading /tmp/ich_mvp/git-ssh.sh 0.0%
>>  INFO Uploading /tmp/ich_mvp/git-ssh.sh 100.0%
>>  INFO [d1c6b4e8] Finished in 2.134 seconds with exit status 0 
>> (successful).
>>  INFO [d6bebce4] Running /usr/bin/env chmod +x /tmp/ich_mvp/git-ssh.sh on 
>> dev-ich-db.myhost.com
>> DEBUG [d6bebce4] Command: ( 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
>> /usr/bin/env chmod +x /tmp/ich_mvp/git-ssh.sh )
>>  INFO [d6bebce4] Finished in 0.185 seconds with exit status 0 
>> (successful).
>> DEBUG Uploading /tmp/ich_mvp/git-ssh.sh 0.0%
>>  INFO Uploading /tmp/ich_mvp/git-ssh.sh 100.0%
>>  INFO [2a7f6a71] Running /usr/bin/env chmod +x /tmp/ich_mvp/git-ssh.sh on 
>> dev-ich.myhost.com
>> DEBUG [2a7f6a71] Command: ( 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
>> /usr/bin/env chmod +x /tmp/ich_mvp/git-ssh.sh )
>>  INFO [2a7f6a71] Finished in 0.488 seconds with exit status 0 
>> (successful).
>> *DEBUG [d6bfd978] Running /usr/bin/env git ls-remote 
>> g...@git.myhost.com:ich/ich_mvp.git on dev-ich-db.myhost.com 
>> <http://dev-ich-db.myhost.com>*
>> *DEBUG [d6bfd978] Command: ( 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
>> GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/ich_mvp/git-ssh.sh /usr/bin/env git 
>> ls-remote g...@git.myhost.com:ich/ich_mvp.git )*
>> *DEBUG [2010547d] Running /usr/bin/env git ls-remote 
>> g...@git.myhost.com:ich/ich_mvp.git on dev-ich.myhost.com 
>> <http://dev-ich.myhost.com>*
>> *DEBUG [2010547d] Command: ( 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
>> GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/ich_mvp/git-ssh.sh /usr/bin/env git 
>> ls-remote g...@git.myhost.com:ich/ich_mvp.git )*
>> *DEBUG [d6bfd978] /usr/bin/env: git*
>> *DEBUG [d6bfd978] : No such file or directory*
>> DEBUG [d6bfd978] Finished in 0.182 seconds with exit status 127 (failed).
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Capistrano" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to capistrano+...@googlegroups.com <javascript:>.
>> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/capistrano/c2d4d393-f794-4805-ab61-ecd4d826ad64%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/6e7a7ca0-b142-4280-9914-2f92114373f9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to