git clone --depth 1 hangs

Bug #1560177 reported by Billy Olsen on 2016-03-21
This bug report is a duplicate of:  Bug #1547141: clone --depth hangs over HTTPS. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
turnip
Undecided
Unassigned

Bug Description

When attempting to perform a shallow clone of a repository over https, the git hangs on a POST request to git-upload-pack. Expect to be able to clone with a depth of 1 in order to do lightweight checkouts of large projects.

Here's output with git tracing enabled:

130 ubuntu@billy-olsen-bastion:~/hardening> GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone --depth 1 https://git.launchpad.net/~openstack-charmers/charms/+source/hardening-ssh-tests-charm trusty/hardening-ssh-tests
trace: built-in: git 'clone' '--depth' '1' 'https://git.launchpad.net/~openstack-charmers/charms/+source/hardening-ssh-tests-charm' 'trusty/hardening-ssh-tests'
Cloning into 'trusty/hardening-ssh-tests'...
trace: run_command: 'git-remote-https' 'origin' 'https://git.launchpad.net/~openstack-charmers/charms/+source/hardening-ssh-tests-charm'
* Couldn't find host git.launchpad.net in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
* Trying 162.213.33.96...
* Connected to git.launchpad.net (162.213.33.96) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification OK
* common name: git.launchpad.net (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=GB,ST=Southwark,L=London,O=CANONICAL GROUP LIMITED,CN=git.launchpad.net
* start date: Wed, 29 Apr 2015 00:00:00 GMT

* expire date: Tue, 03 May 2016 12:00:00 GMT

* issuer: C=US,O=DigiCert Inc,CN=DigiCert SHA2 Secure Server CA
* compression: NULL
* cipher: AES-128-CBC
* MAC: SHA256
> GET /~openstack-charmers/charms/+source/hardening-ssh-tests-charm/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.9.1
Host: git.launchpad.net
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Date: Mon, 21 Mar 2016 18:37:26 GMT
< Content-Type: application/x-git-upload-pack-advertisement
* Server TwistedWeb/15.5.0 is not blacklisted
< Server: TwistedWeb/15.5.0
< Strict-Transport-Security: max-age=15768000
<
* Connection #0 to host git.launchpad.net left intact
trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' '--cloning' '--depth=1' 'https://git.launchpad.net/~openstack-charmers/charms/+source/hardening-ssh-tests-charm/'
trace: exec: 'git' 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' '--cloning' '--depth=1' 'https://git.launchpad.net/~openstack-charmers/charms/+source/hardening-ssh-tests-charm/'
trace: built-in: git 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' '--cloning' '--depth=1' 'https://git.launchpad.net/~openstack-charmers/charms/+source/hardening-ssh-tests-charm/'
* Couldn't find host git.launchpad.net in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
* Trying 162.213.33.95...
* Connected to git.launchpad.net (162.213.33.95) port 443 (#1)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* SSL re-using session ID
* server certificate verification OK
* common name: git.launchpad.net (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=GB,ST=Southwark,L=London,O=CANONICAL GROUP LIMITED,CN=git.launchpad.net
* start date: Wed, 29 Apr 2015 00:00:00 GMT
* expire date: Tue, 03 May 2016 12:00:00 GMT

* issuer: C=US,O=DigiCert Inc,CN=DigiCert SHA2 Secure Server CA
* compression: NULL
* cipher: AES-128-CBC
* MAC: SHA256
> POST /~openstack-charmers/charms/+source/hardening-ssh-tests-charm/git-upload-pack HTTP/1.1
User-Agent: git/1.9.1
Host: git.launchpad.net
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 197

* upload completely sent off: 197 out of 197 bytes
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Date: Mon, 21 Mar 2016 18:37:27 GMT
< Content-Type: application/x-git-upload-pack-result
* Server TwistedWeb/15.5.0 is not blacklisted
< Server: TwistedWeb/15.5.0
< Strict-Transport-Security: max-age=15768000
<

Colin Watson (cjwatson) on 2016-03-21
affects: launchpad → turnip
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers