32

I tried small experiments with Ruby and Rails, and would like to push and pull from the Mac to PC and vice verse.

So I installed what the Git's website's standard recommended Git on PC (MySysGit 1.7.4), and run

git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack

either on the Mac or PC (to start a Git server), and then, on the PC, I cloned and add a file, and commit, and then do a

git push git://192.168.1.31/ master

now it will print out the following and just hang there indefinitely:

Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4)

I tried it on another PC, and it is the same thing. How can this be fixed?

(I am using the command to run the server from question: 'receive-pack': service not enabled for './.git')

Community
  • 1
  • 1
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
  • 1
    I had the same problem just now. All I did was let it do its thing for a few minutes.... and it worked. This could happen by simply having network issues at that time. – Radu Murzea Jan 18 '16 at 09:51

2 Answers2

47

They have just released a version that allows a config option to stop git hanging.

Fix is for https://github.com/msysgit/git/issues/101 in release https://github.com/msysgit/msysgit/releases/tag/Git-1.9.4-preview20140611

You can fix it by setting

git config --global sendpack.sideband false
Adrian Cornish
  • 23,227
  • 13
  • 61
  • 77
9

Apparently due to a bug in msysgit, that prevents it from pushing to git-daemon.

http://code.google.com/p/msysgit/issues/detail?id=457

I was stuck on this myself. You can either install cygwin git (worked for me) or use ssh-based repo (worked for me as well, but i installed the remote repo on linux and used gitolite)

sinelaw
  • 16,205
  • 3
  • 49
  • 80
  • 4
    If anybody, like me, comes around and thinks "Well, it has almost been three years now, "push" is going to work nowadays": No. Still an issue, albeit "closed": https://github.com/msysgit/git/issues/101 – Frederick Nord Feb 11 '14 at 12:34
  • 1
    Yup, I just fell prey to it right now :( At least the issue is "open" now.. but I guess they aren't going to fix it any time soon... – Francisco Noriega Mar 21 '14 at 20:34