I am getting fatal: not a git repository (or any of the parent directories): .git after mina deploy while deploying rails app
Aaquib7269 opened this issue · comments
Hi,
I succesfully deployed my app using mina deploy. then I deleted my app folder from the server . and again tried to deploy from start. I am using mina 0.3.8 gem, After the mina setup. when I run mina deploy --verbose
I am getting
(cd "/home/deploy/apps/myapp/scm" && git fetch "https://github.com/myname/myapp.git" "master:master" --force)
fatal: not a git repository (or any of the parent directories): .git
desc "Deploys the current version to the server."
task :deploy => :environment do
to :before_hook do
# Put things to run locally before ssh
end
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
to :launch do
# invoke :'unicorn:restart'
queue "cd #{fetch(:deploy_to)}/current ; mkdir -p tmp ; touch tmp/restart.txt"
# queue "mkdir -p #{deploy_to}/current/tmp2/"
# queue "touch #{deploy_to}/current/tmp2/restart.txt"
end
end
end
my setup
**task :setup => :environment do
queue %[mkdir -p "#{fetch(:deploy_to)}/shared/log"]
queue %[chmod g+rx,u+rwx "#{fetch(:deploy_to)}/shared/log"]
queue %[mkdir -p "#{fetch(:deploy_to)}/shared/config"]
queue %[chmod g+rx,u+rwx "#{fetch(:deploy_to)}/shared/config"]
queue %[mkdir -p "#{fetch(:deploy_to)}/shared/sockets"]
queue %[chmod g+rx,u+rwx "#{fetch(:deploy_to)}/shared/sockets"]
queue %[touch "#{fetch(:deploy_to)}/shared/config/database.yml"]
queue %[echo "-----> Be sure to edit 'shared/config/database.yml'."]
queue %[touch "#{fetch(:deploy_to)}/shared/config/secrets.yml"]
queue %[echo "-----> Be sure to edit 'shared/config/secrets.yml'."]
queue %[touch "#{fetch(:deploy_to)}/shared/config/config.yml"]
queue %[echo "-----> Be sure to edit 'shared/config/config.yml'."]
queue %[touch "#{fetch(:deploy_to)}/.env"]
queue %[echo "-----> Be sure to edit '.env"]
queue %[mkdir -p "#{fetch(:deploy_to)}/shared/pids/"]
queue %[chmod g+rx,u+rwx "#{fetch(:deploy_to)}/shared/pids"]
end**
Have you tried setting your repository with the ssh url
?
Closing for now. Will reopen when we get more info.