Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capistrano 3 Permission Denied

I'm converting an app from capistrano version 2 to version 3 and now i'm getting this error:

DEBUG [7095ead3] Running /usr/bin/env git ls-remote [email protected]:/myapp/myapp.git on myapp.com
DEBUG [7095ead3] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/myapp.com/git-ssh.sh /usr/bin/env git ls-remote [email protected]:/myapp/myapp.git )
DEBUG [7095ead3]        fatal: cannot exec '/tmp/myapp.com/git-ssh.sh': Permission denied
DEBUG [7095ead3]        fatal: unable to fork
DEBUG [7095ead3] Finished in 0.195 seconds with exit status 128 (failed).

How can i get past this?

like image 219
Catfish Avatar asked Apr 08 '14 17:04

Catfish


1 Answers

I encountered this problem and solved this by reading this website (https://community.webfaction.com/questions/15144/capistrano-3-deploys-fatal-error-executing-tmpmyappgit-sshsh)

So, this is what I attempted

  • Create tmp dir in your HOME directory
  • I added in my .bashrc

    export TMPDIR="$HOME/tmp"

  • In deploy.rb, add this

    set :tmp_dir, "#{fetch(:home)}/tmp"

Then, try to cap production deploy again and it worked for me, hopefully for you too! :D

like image 173
Romans 8.38-39 Avatar answered Nov 05 '22 08:11

Romans 8.38-39