Imapenguin Logo Banner Layout

Capistrano Git Deploy Issue

There is a bug in the capistrano git bridge that’s not been patched in the stable version yet.

If you’re getting:

fatal: Could not parse object

A quick and dirty hack is to add a task that just removes your git cache for now on the deployed server with:

desc "Clear that git cache"
task :clear_git_cache do
  run "rm -Rf /#{deploy_base}/#{application}/shared/cached-copy"
end

before "deploy", "clear_git_cache"

It takes about 1 second longer to do the checkout but I don’t really notice.

Comments are closed.