<p>My shared host did not provide git, so I built and installed it into ~/bin.
When I ran it, I got the following error on most commands, although they were successful.  </p>

<blockquote>
  <p><code>stdin: is not a tty</code></p>
</blockquote>

<p>I can solve that problem by adding:  </p>

<blockquote>
  <p><code>default_run_options[:pty] = true</code></p>
</blockquote>

<p>to my deploy.rb, but then I get this error, which blocks deployment:</p>

<blockquote>
  <p><code>sh: git: command not found</code></p>
</blockquote>

<p>How can I resolve both errors?</p>

<p>I tried adding a ~/.ssh/environment file with <code>"PATH=$PATH:$HOME/bin"</code> (and changing sshd_config to use it) but it did nothing.</p>

<p>It seems whatever shell is being used by capistrano is not using the ~/.bashrc or ~/.bash_profile on the remote server.</p>

<p>Any ideas how to set the path on the remote machine?</p>

<p>other info: I'm using OS X locally, and the shared server is linux on Site5.</p>

A quick workaround is to set the following in your deploy.rb file:
```
```
set :deploy_via, :copy
```
```
This will cause the checkout to occur on your own machine and then be copied to the deployment server.