Comment 0 for bug 806094

Revision history for this message
Florian Rathgeber (florian-rathgeber) wrote :

Tested on various bzr versions (2.2.1 to latest) on ubuntu maverick and natty.

bzr cannot handle unlocking ssh keys protected by a pass phrase for connections via bzr+ssh://

Instead of showing a prompt to enter the pass phrase it dies with an unhelpful error message in 2 flavors (backtraces attached):

1) for lp:* urls:
Permission denied (publickey).
bzr: ERROR: bzrlib.errors.ConnectionReset: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.

2) for bzr+ssh:// urls not pointing to launchpad (even worse, since the server *does* support the protocol):
Server does not understand Bazaar network protocol 3, reconnecting. (Upgrade the server to avoid this.)
bzr: ERROR: bzrlib.errors.ConnectionReset: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.

Reproducible: always

Steps to reproduce:
1) create an ssh key pair protected with a pass phrase
2) set up ~/.ssh/config to use *this* ssh key for launchpad
3) do *not* add the key to ssh-agent (or do anything else which makes it unnecessary to unlock the key with the pass phrase)
4) any bzr command with a lp url will die with the error message above
Similar steps for your own bzr remote server will produce the other error message above

Expected result: prompt for the pass phrase

Workaround: add the key to ssh-agent (or anything else which allows ssh to use the key without authentication)

I think this is a real show stopper since this error is really hard to debug. It has the potential to make even experienced users turn away from bzr.