I want to eventually run a git server on a Raspberry Pi but for now I am testing on ubuntu (running on VirtualBox VM). My development machine is Windows 7 64 bit and running Git For Windows v2.32.0.windows.2 (latest).
I have setup the gitserver on ubuntu like this:
git init --bare myexample.git
git daemon --base-path=. --export-all --enable=receive-pack --reuseaddr --informative-errors --verbos -- ./myexample.git
--enable=receive-pack is supposed to allow push
I have connectivity from Windows to linux, ie I can ping both ways.
I can successfully clone and push from ubuntu:
angus@angus-VirtualBox:~/Documents/Courses/oss/client$ git clone git://192.168.0.92/myexample.git
Cloning into 'myexample'...
warning: You appear to have cloned an empty repository.
angus@angus-VirtualBox:~/Documents/Courses/oss/client$ ls
myexample
angus@angus-VirtualBox:~/Documents/Courses/oss/client$ cd myexample/
I then add a file and commit
angus@angus-VirtualBox:~/Documents/Courses/oss/client/myexample$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 2 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 282 bytes | 282.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git://192.168.0.92/myexample.git
* [new branch] master -> master
But when I attempt the same from Windows I get:
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ git clone git://192.168.0.92/myexample.git
Cloning into 'myexample'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ cd myexample/
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client/myexample (master)
$ git add .
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client/myexample (master)
$ git commit
[master 9099126] changed hello world to hi guys
1 file changed, 1 insertion(+), 1 deletion(-)
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client/myexample (master)
$ git push
It just hangs there on git push command.
I also tried:
$ git remote -v
origin git://192.168.0.92/myexample.git (fetch)
origin git://192.168.0.92/myexample.git (push)
I did find this page which indicates a bug in msysgit but that dates from 2011.
https://serverfault.com/questions/142048/git-daemon-on-linux
It would be really nice to be able to get this to work. I don't need the security of ssh so just using the git protocol on a protected lan is fine for me.
Running in Windows cmd.exe does appear to go further, but still hangs:
D:\projects\Coursera\open-source-software-development\gitstuff\client\myexample>git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3)
So it looks like it gets further - but if I check on server end, no change to repo.