Push branch using SFTP throught a firewall
Eric Fesler
ericml at audaxis.com
Tue May 20 07:53:24 BST 2008
Thanks Martin for your reply.
I tried
ssh -p 522 hostname bzr --version
and got the following response
Bazaar (bzr) 0.15.0
Using python interpreter: /usr/bin/python
Using python standard library: /usr/lib/python2.5
Using bzrlib: /usr/lib/python2.5/site-packages/bzrlib
Using bazaar configuration: /home/eric/.bazaar
Copyright 2005, 2006, 2007 Canonical Ltd.
http://bazaar-vcs.org/
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
The target host is still a Breezy version (I know I should upgrade but I
can't find the time for now ;-) )
I retried
bzr push --create-prefix
sftp://eric@<hostname>:522/home/bzr/voixautobe
and here is the content of the log file:
0.094 encoding stdout as sys.stdout encoding 'UTF-8'
0.094 bzr arguments: [u'push', u'--create-prefix',
u'sftp://eric@<hostname>:522/home/bzr/voixautobe']
0.094 looking for plugins in /home/eric/.bazaar/plugins
0.153 looking for plugins
in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.153 Plugin name __init__ already loaded
0.153 Plugin name __init__ already loaded
0.176 encoding stdout as sys.stdout encoding 'UTF-8'
0.202 ssh implementation is OpenSSH
4.588 Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 834,
in run_bzr_catch_errors
return run_bzr(argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 790,
in run_bzr
ret = run(*run_argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492,
in run_argv_aliases
return self.run(**all_cmd_args)
File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 732,
in run
dir_to = bzrdir.BzrDir.open_from_transport(to_transport)
File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 688, in
open_from_transport
redirected)
File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py",
line 1664, in do_catching_redirections
return action(transport)
File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 665, in
find_format
transport, _server_formats=_server_formats)
File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1422,
in find_format
return format.probe_transport(transport)
File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1432,
in probe_transport
format_string = transport.get(".bzr/branch-format").read()
File "/usr/lib/python2.5/site-packages/bzrlib/transport/sftp.py", line
238, in get
f = self._get_sftp().file(path, mode='rb')
File "/usr/lib/python2.5/site-packages/bzrlib/transport/sftp.py", line
216, in _get_sftp
connection, credentials = self._create_connection()
File "/usr/lib/python2.5/site-packages/bzrlib/transport/sftp.py", line
208, in _create_connection
self._host, self._port)
File "/usr/lib/python2.5/site-packages/bzrlib/transport/ssh.py", line
352, in connect_sftp
self._raise_connection_error(host, port=port, orig_error=e)
File "/usr/lib/python2.5/site-packages/bzrlib/transport/ssh.py", line
228, in _raise_connection_error
orig_error=orig_error)
SocketConnectionError: Unable to connect to SSH host <hostname>:522; EOF
during negotiation
Any idea?
I don't think this is due to the target host since it's working properly
with a Windows client using bzr 1.4.
--
ERic
On Mon, 2008-05-19 at 19:14 +1000, Martin Pool wrote:
> On Sat, May 17, 2008 at 1:23 AM, Eric Fesler <eric at audaxis.com> wrote:
> > Hi,
> >
> > I'm using bzr 1.3.1 on Hardy Heron.
> >
> > I trying to push a branch using SFTP to a machine behind a firewall.
> >
> > On the firewall the port 522 is mapped to the port 22 of the target
> > machine and I can make an ssh connection without any issues.
> >
> > When I try to push the branch using the following command:
> > brz push --create-prefix sftp://user@host:522/<target path>
> > The system asked me the password then I got the following error:
> > bzr: ERROR: Unable to connect to SSH host <hostname>:522; EOF during
> > negotiation
> >
> > I tried the same thing from a windows machine using bzr 1.4 and it works
> > properly.
> >
> > Could it be due to Paramiko?
>
> On Hardy you probably have openssh installed and so we're using that
> to connect rather than Paramiko directly. If you look in ~/.bzr.log
> it should say.
>
> Can you try just
>
> ssh -p 522 hostname bzr --version
>
> and see if that works
>
More information about the bazaar
mailing list