Thursday, May 28, 2015

Git Daemon on linux?



Trying to set up a simple git-daemon on a linux server, and talk to it from a windows box.



On linux server:





  1. Make a folder /home/foo/bar

  2. CD to /home/foo/bar

  3. do a git --bare init here

  4. Do a touch git-daemon-export-ok

  5. CD to /home/foo

  6. Run the command git-daemon --verbose --reuseaddr --base-path=/home/foo --enable=receive-pack



On Windows Client w tortoise Git





  1. Do git.exe clone --progress -v "git://servername/bar" "C:\source\myFolderName" (works)

  2. Create file a.txt, add it to git, and commit (works)

  3. Do a git.exe pull "origin" master and then get fatal: Couldn't find remote ref master (makes sense, master isn't there yet)

  4. Do a git.exe push "origin" master:master and tortoise hangs forever without do anything



I realize why I can't pull from master yet on the remote branch.. but why can't I push my first commit into the remote repo? #4 really should work. Tried it both with tortoise and the mysysgit command line, both cases I hang forever. What am I missing? Server has no useful log


Answer




Unfortunately this is probably a bug in msysgit http://code.google.com/p/msysgit/issues/detail?id=457



As of right now there is a workaround (not in the main branch I think) but no true fix.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...