git push --mirror in a repository with a large number of tags leads to pre-receive throwing errors

Bug #1880756 reported by Andy Whitcroft
This bug report is a duplicate of:  Bug #1868935: AssertionError in pre-receive hook. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
High
Unassigned

Bug Description

Trying to git push --mirror a local repository with approximatly 2000 tags (mostly quite long tag names also) leads to the git.launchpad.net pre-receive hook dieing with one of two errors:

  remote: Traceback (most recent call last):
  remote: File "hooks/pre-receive", line 187, in <module>
  remote: rule_lines = check_ref_permissions(sock, rpc_key, ref_paths)
  remote: File "hooks/pre-receive", line 142, in check_ref_permissions
  remote: {'key': rpc_key, 'paths': ref_paths})
  remote: File "hooks/pre-receive", line 132, in rpc_invoke
  remote: res = json.loads(netstring_recv(sock))
  remote: File "hooks/pre-receive", line 116, in netstring_recv
  remote: assert c.isdigit()
  remote: AssertionError

or:

  remote: Traceback (most recent call last):
  remote: File "hooks/pre-receive", line 187, in <module>
  remote: rule_lines = check_ref_permissions(sock, rpc_key, ref_paths)
  remote: File "hooks/pre-receive", line 142, in check_ref_permissions
  remote: {'key': rpc_key, 'paths': ref_paths})
  remote: File "hooks/pre-receive", line 132, in rpc_invoke
  remote: res = json.loads(netstring_recv(sock))
  remote: File "hooks/pre-receive", line 113, in netstring_recv
  remote: c = sock.recv(1)
  remote: socket.error: [Errno 104] Connection reset by peer

Tags: git Edit Tag help
Changed in launchpad:
importance: Undecided → High
tags: added: git
Changed in launchpad:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers