This pull request fixes LH#30.
That bug had following causes. To use IdentitesOnly option, one have to know what IdentityFile corresponds to what identity (i.e. public key) and vice versa. Because of that KeyManager loads all identity files before listing agent identities. But it is impossible to get public key from encrypted private key file without passphrase; so, KeyManager prompted passphrase even before exchange with agent.
Fix: identities load process was separated to two phases. First phase trying to load all identities without prompting passphrase. It runs before listing agent identities. Second phase runs afterwards and loads all remained identities with passphrase prompt.
Fix "ArgumentError: assertion message must be String or Proc"
LH30: Failing test
Added option to suppress passphrase prompt to KeyFactory
LH30: Failing test clarified a bit
KeyManager#each_identity now trying to load all identites without
promting passphrase before listing agent identites.
Thanks for the fix. It's in release 2.2.1.