Cap Deploy rollback on Net::SSH::Authentication error
I use Nitrous as my primary development environment. The ability to work on any one of a number of projects at any time and from anywhere is simply too convenient to overlook. {As a matter of fact, I am writing this on a Nitrous box from a hospital bed!}
On a site I have been maintaining and continuously updating (on a drogo - Ruby/Rails
Nitrous box), my capistrano deploy script failed one day.
One day my Capistrano deploy for the site returned
[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: ...
The error message was a bit confusing because it pointed to SSH authentication for my deploy user; with which I could easily connect from the Nitrous console command line.
A bit of digging on the Interent revealed this was a problem that crops up when the net-ssh
gem is updated. I was suddenly running net-ssh 2.9.1
but this problem with capistrano will be resolved if I run net-ssh version 2.7
.
On my Digital Ocean Droplet I then had to realign a few other gems. I uninstalled and reinstalled with specific versions the following:
- net-ssh -v 2.9.2
- net-scp -v 1.2.1
And my rake needed to be updated to 10.3.2
I hope this will help you if you found this during a frustrated Internet search.