git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Concurrent fetches and pushes

From
FCFernando Correia <fernandoacorreia@gmail.com>
Date
Oct 1, 2014, 21:51 UTC
Message-ID
<CAH8bp3K01Bkr939S62zYjrtRKeotJoGw+4pEnuE8MXtVk_DbrA@mail.gmail.com>
Are concurrent pushes and fetches to the same repository via HTTP supported?
Considering this architecture:
git --(smart HTTP protocol)--> apache -> git-http-backend
git version is 2.1.1 on client and server.

Multiple clients are fetching from and pushing to the same repositories, sometimes concurrently.

Some pushes are failing with this error:
To https://username:password@host.com/projectrepos/project.git
+ 3711f16...0bdfbc5 master -> master (forced update)
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly

remote: error: failed to lock refs/heads/master To https://username:password@host.com/projectrepos/project.git ! [remote rejected] master -> master (failed to lock) error: failed to push some refs to 'https://username:password@host.com/projectrepos/project.git'

It says it failed to lock but we're not sure why. Error code 52 means it "got nothing".

On the server logs, there are errors like these (I'm not sure if caused by fetch or push requests):

error: Ref refs/heads/master is at f38a8a79752eac8a53fd195bc37fc56c0faf5cfa but expected a586117cd41604b8b2cb9776a98715c591071ad1

error: Ref refs/heads/master is at 6e1108c108ae464a37cbb3ccc84db934656cbcb4 but expected f38a8a79752eac8a53fd195bc37fc56c0faf5cfa

fatal: git upload-pack: not our ref f38a8a79752eac8a53fd195bc37fc56c0faf5cfa

error: Ref refs/heads/master is at 6e1108c108ae464a37cbb3ccc84db934656cbcb4 but expected f38a8a79752eac8a53fd195bc37fc56c0faf5cfa

error: Ref refs/heads/master is at cc853c06962b3562e46cfefb3986abef914809b5 but expected 6e1108c108ae464a37cbb3ccc84db934656cbcb4

These errors don't happen when accessing a repository on the filesystem instead of via HTTP transport.

Does git support concurrent fetch and push operations?
Are there any restrictions to doing that via the HTTP backend?
Message 1 of 1 in “Concurrent fetches and pushes”
  1. Fernando CorreiaOct 1, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.