Tag Archives: Git

Git Daemon Two Common Mistakes

This is a powerful function introduced since git 1.7. The git will listen to a port and receive  incoming git protocol request. When we need to auto deploy project inside a private network, it is one of the easiest way to work with. It doesn’t depend on http or ssh, and much faster. Though it doesn’t support user authentication, it still a good solution for sharing code.

Two common mistake that the git documentation doesn’t mention:

  1. A white list path must be set.
    Something like this won’t work: 
  2. The white list path should be an absolute path or ‘./‘ prefixed.
    Something like below won’t work, the  test_repo should be prefixed:   ./test_repo , or use absolute path 

A simple correct example should be like below.

Then access your server by git push git://server_addr:8123/test_repo .

I wrote a simple shell function to help setup: