1

I want to create a git repository, that I can locally "change" (a normal repository), but, want to share it over http, but I want that it be a read-only repository for the people that clone it.

Is that possible? How can I do that?

thanks in advance.

caarlos0
  • 20,020
  • 27
  • 85
  • 160
  • Of course it's possible, what OS are you trying to do this on? – Roman Oct 01 '12 at 19:39
  • for some tests, in my employee windows box.. but right now I'm putting a VM with some unix up. BTW: do you know a tutorial for do that? I didn't found anything that specific... thanks in advance. – caarlos0 Oct 01 '12 at 19:40
  • There's [this](http://git-scm.com/book/ch4-6.html) section of the git book to share stuff over http. You should be able to just deny write permissions if you want it to be read only. – Roman Oct 01 '12 at 19:44

1 Answers1

1

If your server demands a valid user (ie an authenticated user) for "/git/repos/git-receive-pack", all write operations will be denied for anonymous user.

See SO question "git-http-backend" as an illustration of this configuration.

The other alternative is to install an additional module like Gitolite, which would enable a much finer control on who can read/write on any repo.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250