{"thread":{"id":"29370","subject":"Cannot push a commit","startedAt":"2012-01-15T09:09:52Z","lastAt":"2012-01-24T06:53:27Z","messageCount":7,"participants":["Matthias Fechner","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"182577","messageId":"4F1297E0.1060703@fechner.net","threadId":"29370","inReplyTo":null,"subject":"Cannot push a commit","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2012-01-15T09:09:52Z","receivedAt":"2012-01-15T09:09:52Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Dear List,\n\nI have a big problem with a file which I cannot push to my central git\nrepository.\nThe file can be found here:\nhttp://dl.fechner.net/APP_UD.sch\n\nWhat I did to reproduce it:\nOn my server (freebsd with git 1.7.8.3)\ncd\nmkdir git-test\ncd git-test\ngit init --bare\n\nOn my client a windows pc with tortoise git 1.7.6.0 and git 1.7.8.msysgit.0\nI cloned the repository over ssh\nAdded a small test.txt file, commit and pushed it to the server,\neverything is fine.\nThen a copied the file above to the local repo, added it and commited it.\nIf I try to push it, I get the error message:\ngit.exe push --progress  \"origin\" master:master\n\nCounting objects: 4, done.\nCompressing objects: 100% (3/3)\nWriting objects: 100% (3/3), 80.00 KiB | 137 KiB/s\nWriting objects: 100% (3/3), 91.63 KiB | 137 KiB/s, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nfatal: early EOF\nerror: unpack failed: unpack-objects abnormal exit\nTo idefix@fechner.net:git-test\n! [remote rejected] master -> master (n/a (unpacker error))\nerror: failed to push some refs to 'idefix@fechner.net:git-test'\n\ngit config -l shows on the windows pc:\ncore.symlinks=false\ncore.autocrlf=false\ncolor.diff=auto\ncolor.status=auto\ncolor.branch=auto\ncolor.interactive=true\npack.packsizelimit=2g\nhelp.format=html\nhttp.sslcainfo=/bin/curl-ca-bundle.crt\nsendemail.smtpserver=/bin/msmtp.exe\ndiff.astextplain.textconv=astextplain\nrebase.autosquash=true\nuser.name=Matthias Fechner\nuser.email=idefix@fechner.net\ncore.autocrlf=false\ncore.safecrlf=false\ncore.repositoryformatversion=0\ncore.filemode=false\ncore.bare=false\ncore.logallrefupdates=true\ncore.symlinks=false\ncore.ignorecase=true\ncore.hidedotfiles=dotGitOnly\nremote.origin.fetch=+refs/heads/*:refs/remotes/origin/*\nremote.origin.url=idefix@fechner.net:git-test\nremote.origin.puttykeyfile=\nbranch.master.remote=origin\nbranch.master.merge=refs/heads/master\n\nHow can I solve this problem?\nIs this maybe a bug in git?\n\nThanks a lot\nMatthias\n\n-- \n\n\"Programming today is a race between software engineers striving to\nbuild bigger and better idiot-proof programs, and the universe trying to\nproduce bigger and better idiots. So far, the universe is winning.\" --\nRich Cook\n"},{"id":"182622","messageId":"4F14737A.4040607@fechner.net","threadId":"29370","inReplyTo":"4F1297E0.1060703@fechner.net","subject":"Re: Cannot push a commit","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2012-01-16T18:59:06Z","receivedAt":"2012-01-16T18:59:06Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Am 15.01.2012 10:09, schrieb Matthias Fechner:\n> Dear List,\n> \n> I have a big problem with a file which I cannot push to my central git\n> repository.\n> The file can be found here:\n> http://dl.fechner.net/APP_UD.sch\n\nwhere should I raise a bug report for this?\n\nBye\nMatthias\n"},{"id":"182634","messageId":"20120116212036.GA21132@sigill.intra.peff.net","threadId":"29370","inReplyTo":"4F1297E0.1060703@fechner.net","subject":"Re: Cannot push a commit","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-01-16T21:20:36Z","receivedAt":"2012-01-16T21:20:36Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jan 15, 2012 at 10:09:52AM +0100, Matthias Fechner wrote:\n\n> git.exe push --progress  \"origin\" master:master\n> \n> Counting objects: 4, done.\n> Compressing objects: 100% (3/3)\n> Writing objects: 100% (3/3), 80.00 KiB | 137 KiB/s\n> Writing objects: 100% (3/3), 91.63 KiB | 137 KiB/s, done.\n> Total 3 (delta 0), reused 0 (delta 0)\n> fatal: early EOF\n> error: unpack failed: unpack-objects abnormal exit\n> To idefix@fechner.net:git-test\n> ! [remote rejected] master -> master (n/a (unpacker error))\n> error: failed to push some refs to 'idefix@fechner.net:git-test'\n\nOdd. The unpacking process on the other end claims that it didn't get\nthe whole input (it knows how much to expect based on the earlier parts\nof what is sent) . Yet the connection is still going (because we see the\nerror messages coming from the remote), so it wasn't simply that the\nconnection was dropped.  So either:\n\n  1. Something in the connection cut out but only in a half-duplex way.\n     I guess I could see ssh doing that if its input pipe closed, but\n     that would mean the local pack-objects failed, and I believe git\n     already detects and reports that case.\n\n  2. The packfile sent indicated that it should have more bytes than it\n     does (i.e., either git indicated there were more objects than there\n     actually are, or zlib failed to give a stream-end marker in the\n     middle of an object). This is one of:\n\n     a. A bug in git or zlib.\n\n     b. Something in the connection corrupting the data (e.g., a\n        transport that is not 8-bit clean).\n\nBut in either 2a or 2b, I would expect us to have seen this before, and\nI don't recall seeing anything like it.\n\nYou could try generating a bundle with this pack, like:\n\n  git bundle create foo.bundle master ^origin/master\n\nand then shipping the resulting foo.bundle to the other side, and\npulling from it like:\n\n  git pull /path/to/foo.bundle master\n\nThat should use (roughly) the same pack generation code as the\npush, but avoid the transport. If it works, then it's either a problem\nwith the transport, or there is something really subtle going on\ninside git.\n\nIf it does fail, then that will be a much easier case to repeat and\ndiagnose from there.\n\n-Peff\n"},{"id":"182675","messageId":"4F1524DB.2080009@fechner.net","threadId":"29370","inReplyTo":"20120116212036.GA21132@sigill.intra.peff.net","subject":"Re: Cannot push a commit","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2012-01-17T07:35:55Z","receivedAt":"2012-01-17T07:35:55Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Am 16.01.2012 22:20, schrieb Jeff King:\n>   1. Something in the connection cut out but only in a half-duplex way.\n>      I guess I could see ssh doing that if its input pipe closed, but\n>      that would mean the local pack-objects failed, and I believe git\n>      already detects and reports that case.\n> \n>   2. The packfile sent indicated that it should have more bytes than it\n>      does (i.e., either git indicated there were more objects than there\n>      actually are, or zlib failed to give a stream-end marker in the\n>      middle of an object). This is one of:\n> \n>      a. A bug in git or zlib.\n> \n>      b. Something in the connection corrupting the data (e.g., a\n>         transport that is not 8-bit clean).\n> \n> But in either 2a or 2b, I would expect us to have seen this before, and\n> I don't recall seeing anything like it.\n> \n> You could try generating a bundle with this pack, like:\n> \n>   git bundle create foo.bundle master ^origin/master\n> \n> and then shipping the resulting foo.bundle to the other side, and\n> pulling from it like:\n> \n>   git pull /path/to/foo.bundle master\n\nthanks a lot for your answer.\nI created a new repository which is not a bare repo to use your commands\nposted above (i tested it with the normal push command from the client\nand same error).\n\nI created the bundle on the client, copied it with winscp to the server\nand it was applied fine to the repository:\n$ git pull ../foo.bundle master\nReceiving objects: 100% (3/3), 91.63 KiB, done.\nFrom ../foo.bundle\n * branch            master     -> FETCH_HEAD\nUpdating 53b9b5e..301e730\nFast-forward\n APP_UD.sch |19643\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 19643 insertions(+), 0 deletions(-)\n create mode 100644 APP_UD.sch\n\n\nSo the problem should be located anywhere else.\nI tested now the same on a mac osx as client and there everything works\nas expected, I added the file, commited it and pushed it without errors\nto the server.\n\nSo the problem has something to do with windows as client. I will do\nsome additional test this evening.\n\nWhere can we continue to search?\n\nBye\nMatthias\n\n-- \n\n\"Programming today is a race between software engineers striving to\nbuild bigger and better idiot-proof programs, and the universe trying to\nproduce bigger and better idiots. So far, the universe is winning.\" --\nRich Cook\n"},{"id":"182730","messageId":"4F170E7E.9000804@fechner.net","threadId":"29370","inReplyTo":"4F1524DB.2080009@fechner.net","subject":"Re: Cannot push a commit","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2012-01-18T18:25:02Z","receivedAt":"2012-01-18T18:25:02Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Am 17.01.2012 08:35, schrieb Matthias Fechner:\n> So the problem has something to do with windows as client. I will do\n> some additional test this evening.\n> \n> Where can we continue to search?\n\nthe problem seems to be located in the ssh.exe which comes with git.\n(location in the standard windows install is:\nC:\\Program Files (x86)\\Git\\bin\n)\n\nI downloaded plink.exe from the putty project and copied it into a\ndirectory where the PATH variable points to.\n\nThen I opened the git bash and inserted:\nexport GIT_SSH=plink.exe\ngit push\nCounting objects: 4, done.\nDelta compression using up to 4 threads.\nCompressing objects: 100% (3/3), done.\nWriting objects: 100% (3/3), 91.63 KiB | 123 KiB/s, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nTo idefix@fechner.net:git-test\n   8020989..6ea6180  master -> master\n\nThe currently installed version is OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb\n2007.\nMaybe an updated openssh version in the git bin folder will solve the\nproblem?\n\n\nBye\nMatthias\n\n-- \n\n\"Programming today is a race between software engineers striving to\nbuild bigger and better idiot-proof programs, and the universe trying to\nproduce bigger and better idiots. So far, the universe is winning.\" --\nRich Cook\n"},{"id":"182764","messageId":"20120119020913.GA20219@sigill.intra.peff.net","threadId":"29370","inReplyTo":"4F170E7E.9000804@fechner.net","subject":"Re: Cannot push a commit","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-01-19T02:09:14Z","receivedAt":"2012-01-19T02:09:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 18, 2012 at 07:25:02PM +0100, Matthias Fechner wrote:\n\n> Am 17.01.2012 08:35, schrieb Matthias Fechner:\n> > So the problem has something to do with windows as client. I will do\n> > some additional test this evening.\n> > \n> > Where can we continue to search?\n> [...]\n> Then I opened the git bash and inserted:\n> export GIT_SSH=plink.exe\n> git push\n> [...]\n\nThanks for following up on this. It does seem like openssh is dropping\nyour connection in a half-duplex way, though we don't know why. A bug in\nopenssh sounds like a reasonable candidate...\n\n> The currently installed version is OpenSSH_4.6p1, OpenSSL 0.9.8e 23\n> Feb 2007.  Maybe an updated openssh version in the git bin folder will\n> solve the problem?\n\nEspecially given how old your version is. Certainly I would try with a\nmore recent version. If it clears up the problem, I'm willing to assume\nit's an openssh bug that's been fixed. If it doesn't, then it may be an\nopen openssh bug, or perhaps there is some problem in the way we're\ninvoking it on Windows. We can investigate that path if need be.\n\n-Peff\n"},{"id":"183008","messageId":"4F1E5567.7040300@fechner.net","threadId":"29370","inReplyTo":"20120119020913.GA20219@sigill.intra.peff.net","subject":"Re: Cannot push a commit","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2012-01-24T06:53:27Z","receivedAt":"2012-01-24T06:53:27Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Am 19.01.2012 03:09, schrieb Jeff King:\n> Thanks for following up on this. It does seem like openssh is dropping\n> your connection in a half-duplex way, though we don't know why. A bug in\n> openssh sounds like a reasonable candidate...\n\nI was now able to track the problem down to the command which is causing\nthe problem.\nIf you install git and you have tortoise-svn installed the installer\nselect as ssh client tortoiseplink.exe and this is the program which has\nthe bug.\nI changed the system back to the ssh.exe which comes with the git\ninstaller and it is working fine.\nI downloaded the plink.exe (dev version) for the putty homepage and it\nworks fine.\nIf i use the tortoiseplink.exe again it fails.\n\nHopefully this will help some ppl to solve there problem too.\n\nI'll start to do some tests if the same problem will raise with svn too\nand I ask the tortoise-svn devs to replace the tortoiseplink.exe by a\nnewer version.\nThanks a lot for your help.\n\nBye\nMatthias\n\n-- \n\n\"Programming today is a race between software engineers striving to\nbuild bigger and better idiot-proof programs, and the universe trying to\nproduce bigger and better idiots. So far, the universe is winning.\" --\nRich Cook\n"}]}