capistranorvm-capistranocapistrano3

Capistrano error tar: This does not look like a tar archive


 INFO [050fe961] Running mkdir -p /home/rails/rails-
capistrano/releases/20140114234157 on staging-rails
DEBUG [050fe961] Command: cd /home/rails/rails-capistrano/repo && ( PATH=/opt/ruby/bin:$PATH GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rails/git-ssh.sh mkdir -p /home/rails/rails-capistrano/releases/20140114234157 )
 INFO [050fe961] Finished in 0.142 seconds with exit status 0 (successful).
 INFO [2dea2fe5] Running git archive feature/Capistrano | tar -x -C /home/rails/rails-capistrano/releases/20140114234157 on staging-rails
DEBUG [2dea2fe5] Command: cd /home/rails/rails-capistrano/repo && ( PATH=/opt/ruby/bin:$PATH GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rails/git-ssh.sh git archive feature/Capistrano | tar -x -C /home/rails/rails-capistrano/releases/20140114234157 )
DEBUG [2dea2fe5]    fatal: Not a valid object name
DEBUG [2dea2fe5]    tar: This does not look like a tar archive
DEBUG [2dea2fe5]    tar: 
DEBUG [2dea2fe5]    Exiting with failure status due to previous errors      

I am confused about two things:

  1. Why is Capistrano running git archive here:
    git archive feature/Capistrano | tar -x -C /home/rails/rails-capistrano/releases/20140114234157

  2. Why is tar failing?


Solution

  • I had the same issue, until I realized I was pulling the nonexistent branch from git.