Deploying with Capistrano via cron

Hi,
I have added a rake file in my rails application that executes cap
deploy for my application on a button click. When I run this command
directed from my application folder it deploys correctly.
But running cap deploy as rake tasks gives me following error

executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote ---
    command finished in 10805ms
  * executing "if--- fi"
    servers:
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
*** [deploy:update_code] rolling back

Any help on this will be highly appreciated
Thanks,

Michael Engelhart wrote in post #59877: