Git and Capistrano

Posted by tobi — 05:45 PM Apr 15

Git support in the latest capistrano works very well but there are two gotcha’s I ran into, i’ll document them here so that Google can pick it up.

The first problem was the bizarre error message I got when I forgot to push my changes to the deployment repository:


 ** [err] Needed a single revision
 ** [err] Needed a single revision
 [...]

Needed a single revision, well then. Git seems to use the rare other meaning of “single” which means “existing” or “valid”.

The other problem was harder to track down. Capistrano would simply hang forever after the update_code task. It would also leave the cached_copy directories in a totally invalid state on some servers which required manual rm -rf. Thanks go to Scott Raymond on Twitter for pointing me in the right direction. It seems that we have too many App servers for a stock sshd_config and It triggers some kind of throttling logic which git cannot deal with.

If you are deploying to medium to large server farms better head over to your git box and increase the MaxStartups now.


MaxStartups 10000:1:10000

This solves the problem.

Comments