« return

Changing git remote repos with Capistrano - Repository not found

14-May-2009, Ant

On changing where our remote git repos were stored we got the error
Repository not found
When trying to run
cap deploy
with capistrano.

We had changed the remote origin to the new repos locally with

git remote rm origin
git remote add origin <new remote>

It turned out the you need to change the remote on the server you are deploying to in the folder rails_app/shared/cached-copy
as it still references the old remote.   So the fix on the production server was.

cd rails_app/shared/cached-copy
git remote rm origin
git remote add origin <new remote>