I have a simple deployment via capistrano from a Git repository. At first I was deploying form GitHub, everything worked just fine. But then I moved my repository to BitBucket a
Here's the Capistrano 3 version of what this answer talks about. It might be tedious to do what the answer suggests on each server.
So drop this in deploy.rb
and then run cap
namespace :deploy do
desc 'Fix repo origin, for use when changing git repo URLs'
task :fix_repo_origin do
on roles(:web) do
within repo_path do
execute(:git, "remote set-url origin #{repo_url}")
end
end
end
end