How do I set up a git server without SSH, on a ubuntu system?

I have searched for tutorials, and every tutorial only describes how you set up a SSH or HTTP git. I want to set up a native git server with git:// protocol on TCP 9418.

How do I accomplish that?

I do not want to use SSH as this would require setting up accounts for users.

My plan is to set up a read/write git repo without authentication, and then use the firewall to control access via source-IP (since all my users that should have git access have a static IP).


This might be a difficult challenge. The git server documentation does a pretty clear job of describing the challenges you will face setting this up, including set up of xinetd:

The Cons

The downside of the Git protocol is the lack of authentication. It’s generally undesirable for the Git protocol to be the only access to your project. Generally, you’ll pair it with SSH or HTTPS access for the few developers who have push (write) access and have everyone else use git:// for read-only access. It’s also probably the most difficult protocol to set up. It must run its own daemon, which requires xinetd configuration or the like, which isn’t always a walk in the park. It also requires firewall access to port 9418, which isn’t a standard port that corporate firewalls always allow. Behind big corporate firewalls, this obscure port is commonly blocked.

The documentation also has a section on how to start git as a daemon using Upstart. xinetd would point to that daemon.

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.