1

When I try to git clone a github project under my Windows 7 - MSYS2 VirtualBox VM, it fails:

laurent@Win7 ~/Dev
$ LANG="en" GIT_TRACE="1" git clone git://github.com/nanomsg/nanomsg.git
trace: built-in: git 'clone' 'git://github.com/nanomsg/nanomsg.git'
Cloning into 'nanomsg'...
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 9412 on Win7' '--check-self-contained-and-connected'
remote: Reusing existing pack: 10643, done.
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 9412 on Win7' '--check-self-contained-and-connected'
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 9412 on Win7' '--check-self-contained-and-connected'
remote: Total 10643 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (10643/10643), 5.60 MiB | 244.00 KiB/s, done.
Checking connectivity... trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: exec: 'git' 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all'
fatal: bad object e07b5841092eb3bd3b97188f09819511afc6cbed
fatal: remote did not send all necessary objects

Though, under my Gentoo host, it works:

laurent@Gentoo ~/Documents/tmp $ LANG="en" GIT_TRACE="1" git clone git://github.com/nanomsg/nanomsg.git
trace: built-in: git 'clone' 'git://github.com/nanomsg/nanomsg.git'
Cloning into 'nanomsg'...
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 24970 on Gentoo'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 24970 on Gentoo'
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 24970 on Gentoo'
remote: Reusing existing pack: 10643, done.
remote: Total 10643 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (10643/10643), 5.60 MiB | 243.00 KiB/s, done.
Resolving deltas: 100% (6433/6433), done.
trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all'
Checking connectivity... trace: exec: 'git' 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all'
done

I have tried several times with the same result. I have tried to clone another project, with the same result. I assume being inside a VM is not a problem. After some research, it may be caused by the text/binary difference between Linux and Windows regarding the additional CR for Windows. But I could not find a solution yet.

For information, I installed git inside MSYS2 with its package manager pacman. git installed under MSYS(2) should be al-right ? Or have I to install msysgit instead ?

  • msysgit is the official version of git for windows so I would advice you to try it (it's made for windows instead of running under a generic compatibility layer), but that might not be the problem. The only time I've seen problems like this is when the repo contained files with a : in the filename (allowed in POSIX but not in Windows), but that gave a different error. – dtech Mar 14 '14 at 11:39
  • @dtech Could you elaborate on "official"? What does that mean? Who is endorsing it? Does is mean anything beyond the fact they put it on their page? – jpmc26 Jul 31 '14 at 21:43
1

dtech's solution works: use msysgit, "the official version of Git for Windows".

The bad point is that msysgit uses its own MSYS layer. The installer does not propose integration with existing MSYS setup. A project exists here which aims at providing such integration, but from its TODO list, it seems that all Git auto-tests don't pass yet. It is pre-released v0.2.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.