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

Eric Francis picture Eric Francis · Jan 15, 2014 · Viewed 15.2k times · Source
 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?

Answer

kubbing picture kubbing · May 29, 2014

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