Pushing To Mac Git Daemon

163 views
Skip to first unread message

Michael Hewitt

unread,
Nov 22, 2018, 12:26:53 PM11/22/18
to git-for-windows
My high school programming students with Windows laptops use git-for-windows to clone & pull from my MacBook, which is running 'git daemon' as the server.  Students with Macs can also push completed projects up to my MacBook.  Unfortunately, the Windows laptops hang sending the pack during a 'push' operation.

I believe this may be msys-git bug #457, referenced from Pete's Blog.

Setting up ssh keys for everyone's laptop would be quite involved and use a lot of class time.  The git daemon is a quick and easy way to for me to give my students access.

The server is started on my MacBook with the following command using git version 2.18.0:

git daemon --reuseaddr --base-path=/Users/mhewitt/Documents/Technical/programming_class/repository/student  --enable=receive-pack --export-all --reuseaddr --informative-errors --verbose


My MacBook has a fixed IP address (192.168.5.1).  Each student has their own subdirectory.  Thus, Zach would clone his repository using git-for-windows as follows:

git clone git://192.168.5.1/zach .\logos-cs1

So far, so good.  Zach can commit normally.  However, when he attempts to push, the git-for-windows client yields the following result (64-bit versions 2.18 and 2.19.1, both cmd & bash):

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

At this point, the client hangs and never returns.  The corresponding server output is as follows:

git version 2.18.0

[27712] Ready to rumble

[27713] Connection from 192.168.5.112:50077

[27713] Extended attribute "host": 192.168.5.1

[27713] Request upload-pack for '/zach'

[27712] [27713] Disconnected

[27718] Connection from 192.168.5.112:50464

[27718] Extended attribute "host": 192.168.5.1

[27718] Request receive-pack for '/zach'


When I attempt to push from git-for-windows version 2.20.0.rc0.windows.1 (64-bit), both cmd & bash:

fatal: unable to look up 192.168.5.1 (port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. )

Server is running on port 9418 and prints no output in this case.  Client can ping server.

It sure would be great if git-for-windows were compatible with a 'git daemon' server, because it is such a simple way to setup a local git server.

Thanks!
Mike

d...@linder.org

unread,
Nov 23, 2018, 11:30:37 PM11/23/18
to git-for-windows
Hi Mike!

Sorry I can't help with your specific issue - my wife is a middle-school math teacher and I'm well aware of how frustrating it is working with the tech staff that think "Windows 2003" is a modern platform.  (But I digress...)

If you don't get the self-hosted Git solution figured out, you might want to look into a low-end Synolgy NAS with their "Git Server" app installed (https://www.synology.com/en-global/knowledgebase/DSM/help/Git/git).  It looks like it still uses SSH, but at the very worst you could setup one SSH key pair, have the students all use the same SSH key.

Michael Hewitt

unread,
Nov 24, 2018, 1:27:17 AM11/24/18
to d...@linder.org, git-for-windows
Good advice. I have tested two of my student’s Windows laptops using the same public/private ssh keys to directly access repositories on my MacBook and it seems to work perfectly, so that will be my plan going forward. More than anything, I just wanted to alert the community that Windows cannot push to a ‘git daemon’ server, since it seems like very useful quick-and-dirty local functionality.
Mike

“Is death the last sleep?
No, it is the final awakening.”
- Sir Walter Scott
--
You received this message because you are subscribed to the Google Groups "git-for-windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to git-for-windo...@googlegroups.com.
To post to this group, send email to git-for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/git-for-windows/42342ae2-21bd-4cb7-bb44-c6c111a399b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johannes Sixt

unread,
Nov 24, 2018, 4:49:24 AM11/24/18
to Michael Hewitt, git-for-windows
Am 22.11.18 um 01:17 schrieb Michael Hewitt:
> My high school programming students with Windows laptops use
> git-for-windows to clone & pull from my MacBook, which is running 'git
> daemon' as the server.  Students with Macs can also push completed
> projects up to my MacBook.  Unfortunately, the Windows laptops hang
> sending the pack during a 'push' operation.
>
> I believe this may be msys-git bug #457
> <http://code.google.com/p/msysgit/issues/detail?id=457>, referenced from
> Pete's Blog <https://pete.akeo.ie/2011/07/git-remote-repository.html>.

If you are able to build Git yourself, you can merge this branch:

git pull https://github.com/j6t/git.git mingw-send-pack

This is a workaround for the Windows clients. (The server side does not
require the change.) Let me know if it helps.

-- Hannes

Johannes Schindelin

unread,
Nov 26, 2018, 4:59:23 PM11/26/18
to Johannes Sixt, Michael Hewitt, git-for-windows
Hi Hannes,
It would probably easier to simply set sendpack.sideband=false, as we do
still carry in Git for Windows that patch that lets you switch that off.

Ciao,
Johannes

Johannes Sixt

unread,
Nov 27, 2018, 1:17:01 PM11/27/18
to Johannes Schindelin, Michael Hewitt, git-for-windows
Am 26.11.18 um 22:59 schrieb Johannes Schindelin:
> It would probably easier to simply set sendpack.sideband=false, as we do
> still carry in Git for Windows that patch that lets you switch that off.

Ah, good to know!

-- Hannes
Reply all
Reply to author
Forward
0 new messages