Capistrano failing with fatal: Not a git repository
I’m having a problem deploying my Rails app on my staging environment.
The error message I get is “fatal: Not a git repository” which doesn’t really make sense to me.
- Rails code sharing: gem vs plugin vs submodule?
- In rails, what's the best way to deal with really large files (e.g. videos) that you do not want to commit to the repo and asset pipeline?
- Capistrano Deploy Wipes Database?
- Can't bundle/install Kgio Error
- How to determine which commit and/or which branch was deployed to Heroku?
- Deploying a Git subdirectory in Capistrano
This is the output Capistrano returns when I run it: https://gist.github.com/ngw/8a6f357fefedcc6354b8
I searched for a solution and I tried pretty much everything, I even tried to completely remove the application directory and deploy again from scratch.
I tried to repeat the commands that fail directly on the server, and again I have “fatal: Not a git repository”, for example:
cd /home/deployer/apps/XXXX/current && ~/.rvm/bin/rvm 2.1.1 do bundle exec sidekiqctl quiet /home/deployer/apps/XXXX/shared/tmp/pids/sidekiq.pid fatal: Not a git repository (or any of the parent directories): .git
I’ve tried to switch branch to a production branch that deployed just fine a couple of hours before with no changes: same problem.
I absolutely have no idea how to debug this.
Any suggestion is highly appreciated.
UPDATE: It doesn’t seem there’s a problem interacting with the repo on github, but with the local environment. I think what it’s complaining about is that the project directory isn’t a git repository, which doesn’t even make sense to me…