gitpullgit-pullworking-copy

How can I make my local repository available for git-pull?


I have a working copy repository that I've been working in no problem; the origin for this repository is on GitHub.

I'd like to make my working copy repository available as the origin for my build machine (a VM on another physical host), so that commits I make to my working copy can be built and tested on the build machine without having to go via GitHub first. I already have a build for the GitHub repository going, but I'd like this to be a "golden" repository/build; i.e., if something goes in there, the build against GitHub should be guaranteed to pass.

I've looked at the documentation on Git URLs, and see that there's the option of using a URL in the form git://host.xz[:port]/path/to/repo.git/ (see, e.g., git-clone documentation). I want to do this in the simplest possible way, with the minimum of configuration: I don't want to have to set up an SSH daemon or web server just to publish this to my build machine.

I'm running Windows 7 x64 RC, I have MSysGit and TortoiseGit installed, and I have opened Git's default port (9814) on the firewall. Please assume working copy repo is at D:\Visual Studio Projects\MyGitRepo, and the hostname is devbox. The build machine is Windows Server 2008 x64. I have been trying the following command on the build machine, with the associated output:

D:\Integration>git clone "git://devbox/D:\Visual Studio Projects\MyGitRepo"
Initialized empty Git repository in D:/Integration/MyGitRepo/.git/
devbox[0: 192.168.0.2]: errno=No error
fatal: unable to connect a socket (No error)

Am I missing something?


Solution

  • Five possibilities exist to set up a repository for pull from:

    What you are missing in your example is probably running git-daemon on server. That, or misconfiguring git-daemon.

    Unfortunately I cannot help you with running git-daemon as service on MS Windows. There is nothing in announcement for last version of msysGit about git-daemon not working, though.