简体   繁体   中英

Git. Can't push from windows

I have a server (Debian) with running git-daemon --enable=receive-pack --verbose --reuseaddr --detach --base-path=/mnt/source and git installed on Windows XP.

When I try to use the command push -v origin master on Windows it says pushing to git://192.168.0.100/my_progject.git and stays there. Although, cloned successfully.

In server logs I see:

Mar 16 10:46:36 Server-Debian git-daemon[1424]: Ready to rumble
Mar 16 10:50:50 Server-Debian git-daemon[5289]: Connection from 192.168.0.99:50278
Mar 16 10:50:50 Server-Debian git-daemon[5289]: Extended attributes (20 bytes) exist <host=192.168.0.100>
Mar 16 10:50:50 Server-Debian git-daemon[5289]: Request receive-pack for '/my_progject.git'

and nothing more.

On linux I don't have the same problems - clone and push are both successful.

ps. Sorry for my awful English

upd.

  1. I run git-gui
  2. Try to push from it. Push fails
  3. Kill processe git.exe
  4. Try to push again. Push may be successful.

What could cause this strange behavior?

It's a bug, http://code.google.com/p/msysgit/issues/detail?id=457 We have a workaround, please see the bottom of this article:
http://pete.akeo.ie/2011/07/git-remote-repository.html

Pete said we should use ssh or Samba, I just test it with Samba, pushurl with Samba works fine for me now.

At the server, after pushed, you should use "git reset --hard" to see the new commit.

But if you just want simple pure server, you should use "git --bare init" to init the repo at the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM