bzr doesnt work through http proxy

Bug #504642 reported by AnkurD
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

k This is wat i did..

ankur@AD-laptop:~/temp/lp$ bzr branch lp:bzr-java-lib
bzr: ERROR: [Errno 111] Connection refused
ankur@AD-laptop:~/temp/lp$ bzr branch http://code.launchpad.net/bzr-java-lib
http://code.launchpad.net/bzr-java-lib/ is redirected to https+urllib://code.launchpad.net/bzr-java-lib/
bzr: ERROR: Transport error: Server refuses to fulfill the request (403 Forbidden) for https://code.launchpad.net/bzr-java-lib/.bzr/branch-format

Latest entries from .bzr.log---------------------------
Fri 2010-01-08 12:51:47 +0530
0.122 bzr arguments: [u'branch', u'lp:bzr-java-lib']
0.254 looking for plugins in /home/ankur/.bazaar/plugins
0.254 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.310 encoding stdout as sys.stdout encoding 'UTF-8'
15.951 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1202, in run
    from_location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 959, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 843, in open
    t = get_transport(base, possible_transports=possible_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/__init__.py", line 1553, in get_transport
    base = directories.dereference(base)
  File "/usr/lib/python2.6/dist-packages/bzrlib/directory_service.py", line 58, in dereference
    return service().look_up(name, url)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad/lp_directory.py", line 60, in look_up
    return self._resolve(url)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad/lp_directory.py", line 76, in _resolve
    result = resolve.submit(service)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad/lp_registration.py", line 239, in submit
    self._authenticated)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad/lp_registration.py", line 166, in send_request
    result = method(*method_params)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1235, in request
    self.send_content(h, request_body)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1349, in send_content
    connection.endheaders()
  File "/usr/lib/python2.6/httplib.py", line 892, in endheaders
    self._send_output()
  File "/usr/lib/python2.6/httplib.py", line 764, in _send_output
    self.send(msg)
  File "/usr/lib/python2.6/httplib.py", line 723, in send
    self.connect()
  File "/usr/lib/python2.6/httplib.py", line 1096, in connect
    sock = socket.create_connection((self.host, self.port), self.timeout)
  File "/usr/lib/python2.6/socket.py", line 514, in create_connection
    raise error, msg
error: [Errno 111] Connection refused

15.952 return code 3

Fri 2010-01-08 12:53:06 +0530
0.028 bzr arguments: [u'branch', u'http://code.launchpad.net/bzr-java-lib']
0.038 looking for plugins in /home/ankur/.bazaar/plugins
0.038 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.091 encoding stdout as sys.stdout encoding 'UTF-8'
0.463 1488 bytes left on the HTTP socket
[ 5482] 2010-01-08 12:53:07.652 INFO: http://code.launchpad.net/bzr-java-lib/ is redirected to https+urllib://code.launchpad.net/bzr-java-lib/
0.800 1407 bytes left on the HTTP socket
1.838 1407 bytes left on the HTTP socket
2.745 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1202, in run
    from_location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 959, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 844, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 874, in open_from_transport
    redirected)
  File "/usr/lib/python2.6/dist-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/__init__.py", line 1642, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 861, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1797, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1807, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/http/__init__.py", line 126, in get
    code, response_file = self._get(relpath, None)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/http/_urllib.py", line 118, in _get
    response = self._perform(request)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/http/_urllib.py", line 79, in _perform
    response = self._opener.open(request)
  File "/usr/lib/python2.6/urllib2.py", line 395, in open
    response = meth(req, response)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 1536, in http_response
    code, msg, hdrs)
  File "/usr/lib/python2.6/urllib2.py", line 433, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 1549, in http_error_default
    ' for %s' % req.get_full_url())
TransportError: Transport error: Server refuses to fulfill the request (403 Forbidden) for https://code.launchpad.net/bzr-java-lib/.bzr/branch-format

2.745 return code 3

-------------------------------------------------------------

I am behind a squid proxy server at my university that serves http as well as https requests.
I know the proxy server is working bcoz wget works for both http and https. I have set http_proxy and https_proxy appropriately.

This is causing me great inconvinience as I can not even view project source codes from launchpad.
Mayb I am doing something wrong. Please reply...

Revision history for this message
Martin Pool (mbp) wrote :

This is bug 186920, fixed in bzr 2.1.0b2 and later.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.