bzr 2.3b2: since you asked....
Andrew Bennetts
andrew.bennetts at canonical.com
Wed Oct 27 02:53:14 BST 2010
Thanks for the feedback, even though it's negative. I'd like to address
the SSH issue.
der Mouse wrote:
[...]
> As mentioned above, I discovered that you appear to integrate openssh's
> internals into bzr. Given the other issues above, I decided it was
We don't integrate openssh's internals at all. We don't even require
openssh for SSH, we work with ssh from SSH Corp, GNU lsh, plink and
paramiko. Plugins can add support for other SSH implementations.
Our integrations with openssh is simply that in the absence of explicit
configuration otherwise, we execute 'ssh -V' to distinguish between
OpenSSH, SSH Corp, GNU lsh, and paramiko, which are all the 'ssh'
binaries in the wild that have been reported to us so far. We use this
to determine how to construct the command line to execute a remote
command or to connect to a remote sftp subsystem.
So what's happened here appears to be that bzr correctly determined that
'ssh' on your system was not a flavour it recognised. So it falls back
to the paramiko library for Python, which includes some logic for trying
to make use of OpenSSH's data files. It's probably not much
consolation, but it's not bzr prompting your for your passphrase, it's
paramiko.
If you didn't have paramiko installed either, bzr would have said:
bzr: ERROR: Don't know how to handle SSH connections. Please set
BZR_SSH environment variable.
Which isn't great, but at least hints towards what to look for in our
documentation.
To fix your problem we could extend bzr to know how to use your SSH
implementation. A plugin to do this would look something like:
cat > ~/.bazaar/plugins/dermouse_ssh.py << EOT
from bzrlib.transport import ssh
class DerMouseVendor(ssh.SubprocessVendor):
executable_path = 'ssh'
def _get_vendor_specific_argv(self, username, host, port, subsystem=None,
command=None):
# XXX: I'm guessing at your command's syntax. Adjust to suit!
args = [self.executable_path, '-u', username, '-p', port, host]
if subsystem is not None:
args.extend(['-s', subsystem])
else:
args.extend(command)
return args
vendor = DerMouseVendor()
ssh.register_ssh_vendor('derMouse', vendor)
ssh.register_default_ssh_vendor(vendor)
EOT
(There may be small errors as I haven't tested that, but it should be
fairly close.)
Ideally I'd like bzr to automatically detect and work with any ssh that
is likely to be encountered by users, so it would be good to teach bzr
how to work with your ssh (unless you are the only user, in which case a
plugin is probably more appropriate). Is your SSH implementation
available anywhere?
So far all other 'ssh' executables our users have reported to us have
emitted a version string in response to 'ssh -V', and we use that to
automatically identify the SSH implementation. I don't know of a more
reliable method, but I'd be happy to learn of one. Even if we
can't or don't improve the automatic detection, we could at least add
your SSH as a manually configurable choice.
I hope this is of some help.
-Andrew.
More information about the bazaar
mailing list