Ruby on Rails app transfer to webserver fails

Viewed 28

I have made the GoRails https://gorails.com/deploy/ubuntu/20.04 tutorial. Everything installed. But now I can not transfer my app from the Mac to the Linux web server. The following error with probably git appears. What can I do?

cap production deploy    
00:00 git:wrapper
      01 mkdir -p /tmp
    ✔ 01 deploy@192.168.1.140 0.056s
      Uploading /tmp/git-ssh-f9a2d67df5286b2a1eed.sh 100.0%
      02 chmod 700 /tmp/git-ssh-f9a2d67df5286b2a1eed.sh
    ✔ 02 deploy@192.168.1.140 0.013s
00:00 git:check
      01 git ls-remote git@github.com:mgasche/planer.git HEAD
    ✔ 01 deploy@192.168.1.140 1.065s
00:01 deploy:check:directories
      01 mkdir -p /home/deploy/planer/shared /home/deploy/planer/releases
    ✔ 01 deploy@192.168.1.140 0.013s
00:01 deploy:check:linked_dirs
      01 mkdir -p /home/deploy/planer/shared/log /home/deploy/planer/shared/tmp/pids /home/deploy/planer/shared/tmp/cache /home/deploy/planer/shared/tmp/sockets /home/deploy/plan…
    ✔ 01 deploy@192.168.1.140 0.052s
00:01 git:clone
      The repository mirror is at /home/deploy/planer/repo
00:01 git:update
      01 git remote set-url origin git@github.com:mgasche/planer.git
    ✔ 01 deploy@192.168.1.140 0.058s
      02 git remote update --prune
      02 Fetching origin
    ✔ 02 deploy@192.168.1.140 1.190s
00:02 git:create_release
      01 mkdir -p /home/deploy/planer/releases/20220501182040
    ✔ 01 deploy@192.168.1.140 0.058s
      02 git archive master | /usr/bin/env tar -x -f - -C /home/deploy/planer/releases/20220501182040
      02 fatal: not a valid object name: master
      02 tar: This does not look like a tar archive
      02 tar:
      02 Exiting with failure status due to previous errors
1 Answers

Beside the content (commits or empty repository), don't forget that a repository now (since Oct. 2020) has by default a main branch, not a master branch.

Make sure your git archive command takes into account the branch you need.

Related