bzr-git does not work in https vis-a-vis pycrypto.git

Bug #788750 reported by Eli Zaretskii
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
New
Undecided
Unassigned

Bug Description

This command:

  bzr branch https://github.com/dlitz/pycrypto.git

hangs for a few minutes, and eventually aborts with this error message:

  bzr: ERROR: Invalid http response for https://github.com/dlitz/pycrypto.git/info/refs: Bad status line received

The full traceback is below. Trying "git clone" with the same address on the same machine succeeds.

See also the discussion in the thread starting here:

  https://lists.ubuntu.com/archives/bazaar/2011q2/072842.html

  Thu 2011-05-26 10:21:29 +0300
  0.329 bazaar version: 2.3.3
  0.329 bzr arguments: [u'-Dhttp', u'branch', u'https://github.com/dlitz/pycrypto.git']
  0.439 looking for plugins in C:/Documents and Settings/p0009057/Application Data/bazaar/2.0/plugins
  0.439 looking for plugins in C:/Program Files/Bazaar/plugins
  1.206 encoding stdout as sys.stdout encoding 'cp862'
  1.253 failed to import pycurl: No module named pycurl
  1.253 failed to instantiate transport <bzrlib.registry._LazyObjectGetter object at 106bb20, module='bzrlib.transport.http._pycurl' attribute='PyCurlTransport' imported=False> for 'https://github.com/dlitz/pycrypto.git': DependencyNotPresent(Unable to import library "pycurl": No module named pycurl)
  1.786 bzr-svn: using Subversion 1.6.6 (), subvertpy 0.7.5
  2.350 * About to connect() to github.com:443
  4.684 > OPTIONS /dlitz/pycrypto.git/
  4.684 > Host: github.com
  > Accept: */*
  > User-Agent: bzr/2.3.3 (urllib)
  > Connection: Keep-Alive
  > Pragma: no-cache
  > Cache-Control: max-age=0

  5.154 < HTTP/1.1 404 Not Found
  5.154 < Server: nginx/0.7.67
  < Date: Thu, 26 May 2011 07:20:02 GMT
  < Content-Type: text/html; charset=utf-8
  < Connection: keep-alive
  < Status: 404 Not Found
  < X-Runtime: 15ms
  < Content-Length: 19315
  < Set-Cookie: csrf_id=<OBFUSCATED>; path=/
  < Set-Cookie: _gh_sess=<OBFUSCATED>; path=/; expires=Fri, 01 Jan 2021 00:00:00 GMT; secure; HttpOnly
  < Cache-Control: no-cache

  5.185 > POST /dlitz/pycrypto.git/.bzr/smart
  5.185 > Content-Length: 6
  > Connection: Keep-Alive
  > Accept: */*
  > User-Agent: bzr/2.3.3 (urllib)
  > Host: github.com
  > Pragma: no-cache
  > Cache-Control: max-age=0
  > Content-Type: application/octet-stream

  5.874 < HTTP/1.1 404 Not Found
  5.874 < Server: nginx/0.7.67
  < Date: Thu, 26 May 2011 07:20:03 GMT
  < Content-Type: text/html; charset=utf-8
  < Connection: keep-alive
  < Status: 404 Not Found
  < Content-Length: 19367
  < Set-Cookie: csrf_id=<OBFUSCATED>; path=/
  < Set-Cookie: _gh_sess=<OBFUSCATED>; path=/; expires=Fri, 01 Jan 2021 00:00:00 GMT; secure; HttpOnly
  < Cache-Control: no-cache

  5.890 > GET /dlitz/pycrypto.git/.bzr/branch-format
  5.890 > Host: github.com
  > Accept: */*
  > User-Agent: bzr/2.3.3 (urllib)
  > Connection: Keep-Alive
  > Pragma: no-cache
  > Cache-Control: max-age=0

  6.219 < HTTP/1.1 404 Not Found
  6.219 < Server: nginx/0.7.67
  < Date: Thu, 26 May 2011 07:20:03 GMT
  < Content-Type: text/html; charset=utf-8
  < Connection: keep-alive
  < Status: 404 Not Found
  < Content-Length: 19362
  < Set-Cookie: csrf_id=<OBFUSCATED>; path=/
  < Set-Cookie: _gh_sess=<OBFUSCATED>; path=/; expires=Fri, 01 Jan 2021 00:00:00 GMT; secure; HttpOnly
  < Cache-Control: no-cache

  6.219 > HEAD /dlitz/pycrypto.git/info/refs
  6.219 > Host: github.com
  > Accept: */*
  > User-Agent: bzr/2.3.3 (urllib)
  > Connection: Keep-Alive
  > Pragma: no-cache
  > Cache-Control: max-age=0

  81.563 * About to connect() to github.com:443
  82.174 > HEAD /dlitz/pycrypto.git/info/refs
  82.174 > Host: github.com
  > Accept: */*
  > User-Agent: bzr/2.3.3 (urllib)
  > Connection: Keep-Alive
  > Pragma: no-cache
  > Cache-Control: max-age=0

  157.533 Transferred: 61kB (0.4kB/s r:60kB w:1kB)
  157.533 Traceback (most recent call last):
    File "bzrlib\commands.pyo", line 926, in exception_to_return_code
    File "bzrlib\commands.pyo", line 1126, in run_bzr
    File "bzrlib\commands.pyo", line 691, in run_argv_aliases
    File "bzrlib\commands.pyo", line 713, in run
    File "bzrlib\cleanup.pyo", line 135, in run_simple
    File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
    File "bzrlib\builtins.pyo", line 1183, in run
    File "bzrlib\bzrdir.pyo", line 806, in open_tree_or_branch
    File "bzrlib\bzrdir.pyo", line 717, in open
    File "bzrlib\bzrdir.pyo", line 747, in open_from_transport
    File "bzrlib\lazy_import.pyo", line 128, in __call__
    File "bzrlib\transport\__init__.pyo", line 1670, in do_catching_redirections
    File "bzrlib\bzrdir.pyo", line 734, in find_format
    File "bzrlib\controldir.pyo", line 754, in find_format
    File "C:/Program Files/Bazaar/plugins\git\__init__.py", line 130, in probe_transport
    File "bzrlib\transport\__init__.pyo", line 569, in has_any
    File "bzrlib\transport\http\_urllib.pyo", line 164, in has
    File "bzrlib\transport\http\_urllib.pyo", line 157, in _head
    File "bzrlib\transport\http\_urllib.pyo", line 79, in _perform
    File "urllib2.pyo", line 391, in open
    File "urllib2.pyo", line 409, in _open
    File "urllib2.pyo", line 369, in _call_chain
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 763, in https_open
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 669, in do_open
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 584, in retry_or_raise
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 669, in do_open
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 665, in do_open
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 267, in getresponse
    File "httplib.pyo", line 990, in getresponse
    File "bzrlib\transport\http\_urllib2_wrappers.pyo", line 188, in begin
    File "httplib.pyo", line 391, in begin
    File "httplib.pyo", line 369, in _read_status
  InvalidHttpResponse: Invalid http response for https://github.com/dlitz/pycrypto.git/info/refs: Bad status line received

  157.533 return code 3

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 788750] [NEW] bzr-git does not work in https vis-a-vis pycrypto.git

On Thu, 2011-05-26 at 17:34 +0000, Eli Zaretskii wrote:
> Public bug reported:
>
> This command:
>
> bzr branch https://github.com/dlitz/pycrypto.git
>
> hangs for a few minutes, and eventually aborts with this error message:
>
> bzr: ERROR: Invalid http response for
> https://github.com/dlitz/pycrypto.git/info/refs: Bad status line
> received
github doesn't support "dumb" access to git repositories, it only
supports the smart server protocol but dulwich/bzr-git doesn't yet.

You can use git:// instead, which they also support.

this is a dupe, but I don't have the right bug # here (offline atm).

Cheers,

jelmer

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.