1

I want user A and B to have clone, push and pull while user C can only do clone and pull (no push)

How do I do that?

pinoyskul
  • 143
  • 1
  • 5

2 Answers2

2

git-dameon is used for public access. But you can use gitosis to grant read-only access to a particular group of users. For instance:

[group thegood]
writable = myRepo
members = A B
[group thebad]
readonly = myRepo
members = C
[repo myRepo]
description = "my project"

See example.conf for more information.

Po' Lazarus
  • 477
  • 5
  • 13
0

Gitosis can't limit write access to repository. If user is in members list then it has all read/commit rights.

Original documentation mentions that in such case just setup a git-daemon instance to repositories:

sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
Marcin Gil
  • 68,043
  • 8
  • 59
  • 60