5

I use gitolite to manage git repositories, that are available over the internet using SSH and private keys.

I want to provide read-only access to some of those repositories from my LAN. I know that there are some pitfalls when using git over http, and I want to avoid the complex git-over-http setup just for read-only access.

As the repositories are bare ones, and I only want to read: Will it work flawlessly, if I just setup any regular web server to server the git repositories over http? Are there any drawbacks?

1

Here are your options:

  1. As you mentioned u can use http (no setup required) for read only.

  2. Use git bundle (Its is used as a read only repository) http://git-scm.com/docs/git-bundle

  3. Set up a commit/push hook and in your hook use exit 0 to terminate the git push without anything being pushed to your repository.

  4. Of course there are other options (but they are not ones that worth mentioning in details: like set up groups permissions, block any user that is not u (hooks) and more.)

Hope it was helpful for you.

0

See the article Share over apache http for a complete cook-book on setting up the Apache sharing and on controlling access.

This very detailed article is much too long to reproduce here.

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.