fabric/fabric — pull request #865 by sirosen (2013-03-20 07:08:33+00:00)
Title: Require Authentication Flag to fab

This is a fix for an issue (can't track it down right now) which I and others have encountered.

The basic idea is that there should be a flag to fabric like skip-bad-hosts which allows us to require key based authentication from hosts. Users whose hosts are expected to have ssh keys already deployed want to skip authentication failures and catch them in the same manner as offline hosts.

The changes are very minimal, but support this functionality without the need for any funny business like user written hooks into paramiko to check for keys. Instead, the check is performed as part of the extant Fabric NetworkError handling procedures (although with a weird peek into the wrapped exception to match it to an authentication failure).

I've tried to follow the guidelines, but I'm still pretty clumsy with git, so apologies for any mistakes. If this doesn't meet the quality standard for Fabric, please let me know so that I can clean it up and improve it.