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

git push over http is very dangerous

From
CChristian <crich-ml@beronet.com>
Date
Apr 16, 2007, 15:22 UTC
Message-ID
<462394AC.303@beronet.com>
Hi Git developers,
first of all thanks for the great toolkit :)

We are using git for the mISDN Open Source ISDN Stack (www.misdn.org / git.misdn.org). We are using webdav to push up data from users with write access. Readonly access is granted via the git daemon.

We have moved from CVS to git in the beginning of last week, all went well until this weekend. This weekend one developer wanted to push some of his local modifications, unfortunately during the push his http connection seemed to have broken or so. Unfortunately git does not prove if the push went well. Therefore our repository was broken this morning.

We found out that it was broken, because we could not do a pull or clone from the central repository anymore, but we got an error message.

Then i did a "git log" which worked well. then i wanted to "show" the last 2 commits, so i did: "git show":

error: corrupt loose object 'cd1aac1a43cfdac07118240f75c0ba7662eb8140' <crich1999> error: cd1aac1a43cfdac07118240f75c0ba7662eb8140: object corrupt or missing

i found that i could "git show" all commits, but only the last 2 produced the above error message.

gitster from IRC helped me out and showed me that i could do
git branch -f master master~2 
to remove the 2 commits. i did that and all worked well again!

I wonder if it would be possible to delay a central push until all data was uploaded, then after the upload finished a checksum is transmitted, if the checksum is correct, the push can be done centrally..

cheers,
christian
Next: Linus Torvalds
Message 1 of 9 in “git push over http is very dangerous”
  1. ChristianApr 16, 2007
  2. Linus TorvaldsApr 16, 2007
  3. Junio C HamanoApr 16, 2007
  4. Linus TorvaldsApr 16, 2007
  5. ChristianApr 20, 2007
  6. Junio C HamanoApr 21, 2007
  7. ChristianApr 21, 2007
  8. Junio C HamanoApr 21, 2007
  9. ChristianApr 22, 2007

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.